Files
47
Total Lines
23501
Coverage
61.0%
270 / 436 lines
Actions
0.0%
lib/chimera/src/Asserts.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | abstract contract Asserts { |
| 5 | function gt(uint256 a, uint256 b, string memory reason) internal virtual; |
| 6 | |
| 7 | function gte(uint256 a, uint256 b, string memory reason) internal virtual; |
| 8 | |
| 9 | function lt(uint256 a, uint256 b, string memory reason) internal virtual; |
| 10 | |
| 11 | function lte(uint256 a, uint256 b, string memory reason) internal virtual; |
| 12 | |
| 13 | function eq(uint256 a, uint256 b, string memory reason) internal virtual; |
| 14 | |
| 15 | function t(bool b, string memory reason) internal virtual; |
| 16 | |
| 17 | function between(uint256 value, uint256 low, uint256 high) internal virtual returns (uint256); |
| 18 | |
| 19 | function between(int256 value, int256 low, int256 high) internal virtual returns (int256); |
| 20 | |
| 21 | function precondition(bool p) internal virtual; |
| 22 | } |
| 23 |
0.0%
lib/chimera/src/BaseProperties.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseSetup} from "./BaseSetup.sol"; |
| 5 | |
| 6 | abstract contract BaseProperties is BaseSetup {} |
| 7 |
0.0%
lib/chimera/src/BaseSetup.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | abstract contract BaseSetup { |
| 5 | function setup() internal virtual; |
| 6 | } |
| 7 |
0.0%
lib/chimera/src/BaseTargetFunctions.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseProperties} from "./BaseProperties.sol"; |
| 5 | import {Asserts} from "./Asserts.sol"; |
| 6 | |
| 7 | abstract contract BaseTargetFunctions is BaseProperties, Asserts {} |
| 8 |
0.0%
lib/chimera/src/CryticAsserts.sol
Lines covered: 0 / 5 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {Asserts} from "./Asserts.sol"; |
| 5 | |
| 6 | contract CryticAsserts is Asserts { |
| 7 | event Log(string); |
| 8 | |
| 9 | function gt(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 10 | if (!(a > b)) { |
| 11 | emit Log(reason); |
| 12 | assert(false); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | function gte(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 17 | if (!(a >= b)) { |
| 18 | emit Log(reason); |
| 19 | assert(false); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | function lt(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 24 | if (!(a < b)) { |
| 25 | emit Log(reason); |
| 26 | assert(false); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | function lte(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 31 | if (!(a <= b)) { |
| 32 | emit Log(reason); |
| 33 | assert(false); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | function eq(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 38 | if (!(a == b)) { |
| 39 | emit Log(reason); |
| 40 | assert(false); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | function t(bool b, string memory reason) internal virtual override { |
| 45 | if (!b) { |
| 46 | emit Log(reason); |
| 47 | assert(false); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function between(uint256 value, uint256 low, uint256 high) internal virtual override returns (uint256) { |
| 52 | if (value < low || value > high) { |
| 53 | uint256 ans = low + (value % (high - low + 1)); |
| 54 | return ans; |
| 55 | } |
| 56 | return value; |
| 57 | } |
| 58 | |
| 59 | function between(int256 value, int256 low, int256 high) internal virtual override returns (int256) { |
| 60 | if (value < low || value > high) { |
| 61 | int256 range = high - low + 1; |
| 62 | int256 clamped = (value - low) % (range); |
| 63 | if (clamped < 0) clamped += range; |
| 64 | int256 ans = low + clamped; |
| 65 | return ans; |
| 66 | } |
| 67 | return value; |
| 68 | } |
| 69 | |
| 70 | function precondition(bool p) internal virtual override { |
| 71 | require(p); |
| 72 | } |
| 73 | } |
| 74 |
0.0%
lib/chimera/src/FoundryAsserts.sol
Lines covered: 0 / 3 (0.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {Test} from "forge-std/Test.sol"; |
| 5 | import {Asserts} from "./Asserts.sol"; |
| 6 | |
| 7 | contract FoundryAsserts is Test, Asserts { |
| 8 | function gt(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 9 | assertGt(a, b, reason); |
| 10 | } |
| 11 | |
| 12 | function gte(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 13 | assertGe(a, b, reason); |
| 14 | } |
| 15 | |
| 16 | function lt(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 17 | assertLt(a, b, reason); |
| 18 | } |
| 19 | |
| 20 | function lte(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 21 | assertLe(a, b, reason); |
| 22 | } |
| 23 | |
| 24 | function eq(uint256 a, uint256 b, string memory reason) internal virtual override { |
| 25 | assertEq(a, b, reason); |
| 26 | } |
| 27 | |
| 28 | function t(bool b, string memory reason) internal virtual override { |
| 29 | assertTrue(b, reason); |
| 30 | } |
| 31 | |
| 32 | function between(uint256 value, uint256 low, uint256 high) internal virtual override returns (uint256) { |
| 33 | if (value < low || value > high) { |
| 34 | uint256 ans = low + (value % (high - low + 1)); |
| 35 | return ans; |
| 36 | } |
| 37 | return value; |
| 38 | } |
| 39 | |
| 40 | function between(int256 value, int256 low, int256 high) internal virtual override returns (int256) { |
| 41 | if (value < low || value > high) { |
| 42 | int256 range = high - low + 1; |
| 43 | int256 clamped = (value - low) % (range); |
| 44 | if (clamped < 0) clamped += range; |
| 45 | int256 ans = low + clamped; |
| 46 | return ans; |
| 47 | } |
| 48 | return value; |
| 49 | } |
| 50 | |
| 51 | function precondition(bool p) internal virtual override { |
| 52 | vm.assume(p); |
| 53 | } |
| 54 | } |
| 55 |
100.0%
lib/chimera/src/Hevm.sol
Lines covered: 1 / 1 (100.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | // slither-disable-start shadowing-local |
| 5 | |
| 6 | interface IHevm { |
| 7 | // Set block.timestamp to newTimestamp |
| 8 | function warp(uint256 newTimestamp) external; |
| 9 | |
| 10 | // Set block.number to newNumber |
| 11 | function roll(uint256 newNumber) external; |
| 12 | |
| 13 | // Add the condition b to the assumption base for the current branch |
| 14 | // This function is almost identical to require |
| 15 | function assume(bool b) external; |
| 16 | |
| 17 | // Sets the eth balance of usr to amt |
| 18 | function deal(address usr, uint256 amt) external; |
| 19 | |
| 20 | // Loads a storage slot from an address |
| 21 | function load(address where, bytes32 slot) external returns (bytes32); |
| 22 | |
| 23 | // Stores a value to an address' storage slot |
| 24 | function store(address where, bytes32 slot, bytes32 value) external; |
| 25 | |
| 26 | // Signs data (privateKey, digest) => (v, r, s) |
| 27 | function sign(uint256 privateKey, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); |
| 28 | |
| 29 | // Gets address for a given private key |
| 30 | function addr(uint256 privateKey) external returns (address addr); |
| 31 | |
| 32 | // Performs a foreign function call via terminal |
| 33 | function ffi(string[] calldata inputs) external returns (bytes memory result); |
| 34 | |
| 35 | // Performs the next smart contract call with specified `msg.sender` |
| 36 | function prank(address newSender) external; |
| 37 | |
| 38 | // Sets msg.sender to the specified sender until stopPrank() is called |
| 39 | // NOTE: not currently supported by Medusa |
| 40 | function startPrank(address sender) external; |
| 41 | |
| 42 | // Resets msg.sender to the default sender |
| 43 | function stopPrank() external; |
| 44 | |
| 45 | // Creates a new fork with the given endpoint and the latest block and returns the identifier of the fork |
| 46 | function createFork(string calldata urlOrAlias) external returns (uint256); |
| 47 | |
| 48 | // Takes a fork identifier created by createFork and sets the corresponding forked state as active |
| 49 | function selectFork(uint256 forkId) external; |
| 50 | |
| 51 | // Returns the identifier of the current fork |
| 52 | function activeFork() external returns (uint256); |
| 53 | |
| 54 | // Labels the address in traces |
| 55 | function label(address addr, string calldata label) external; |
| 56 | |
| 57 | /// Sets an address' code. |
| 58 | function etch(address target, bytes calldata newRuntimeBytecode) external; |
| 59 | } |
| 60 | |
| 61 | IHevm constant vm = IHevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); |
| 62 | |
| 63 | // slither-disable-end shadowing-local |
| 64 |
0.0%
lib/forge-std/src/Base.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {StdStorage} from "./StdStorage.sol"; |
| 5 | import {Vm, VmSafe} from "./Vm.sol"; |
| 6 | |
| 7 | abstract contract CommonBase { |
| 8 | /// @dev Cheat code address. |
| 9 | /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`. |
| 10 | address internal constant VM_ADDRESS = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D; |
| 11 | |
| 12 | /// @dev console.sol and console2.sol work by executing a staticcall to this address. |
| 13 | /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`. |
| 14 | address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; |
| 15 | |
| 16 | /// @dev Used when deploying with create2. |
| 17 | /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy. |
| 18 | address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; |
| 19 | |
| 20 | /// @dev The default address for tx.origin and msg.sender. |
| 21 | /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`. |
| 22 | address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38; |
| 23 | |
| 24 | /// @dev The address of the first contract `CREATE`d by a running test contract. |
| 25 | /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1. |
| 26 | /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`. |
| 27 | address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; |
| 28 | |
| 29 | /// @dev Deterministic deployment address of the Multicall3 contract. |
| 30 | /// Taken from https://www.multicall3.com. |
| 31 | address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11; |
| 32 | |
| 33 | /// @dev The order of the secp256k1 curve. |
| 34 | uint256 internal constant SECP256K1_ORDER = |
| 35 | 115792089237316195423570985008687907852837564279074904382605163141518161494337; |
| 36 | |
| 37 | uint256 internal constant UINT256_MAX = |
| 38 | 115792089237316195423570985008687907853269984665640564039457584007913129639935; |
| 39 | |
| 40 | Vm internal constant vm = Vm(VM_ADDRESS); |
| 41 | StdStorage internal stdstore; |
| 42 | } |
| 43 | |
| 44 | abstract contract TestBase is CommonBase {} |
| 45 | |
| 46 | abstract contract ScriptBase is CommonBase { |
| 47 | VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS); |
| 48 | } |
| 49 |
0.0%
lib/forge-std/src/StdAssertions.sol
Lines covered: 0 / 9 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {Vm} from "./Vm.sol"; |
| 5 | |
| 6 | abstract contract StdAssertions { |
| 7 | Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 8 | |
| 9 | event log(string); |
| 10 | event logs(bytes); |
| 11 | |
| 12 | event log_address(address); |
| 13 | event log_bytes32(bytes32); |
| 14 | event log_int(int256); |
| 15 | event log_uint(uint256); |
| 16 | event log_bytes(bytes); |
| 17 | event log_string(string); |
| 18 | |
| 19 | event log_named_address(string key, address val); |
| 20 | event log_named_bytes32(string key, bytes32 val); |
| 21 | event log_named_decimal_int(string key, int256 val, uint256 decimals); |
| 22 | event log_named_decimal_uint(string key, uint256 val, uint256 decimals); |
| 23 | event log_named_int(string key, int256 val); |
| 24 | event log_named_uint(string key, uint256 val); |
| 25 | event log_named_bytes(string key, bytes val); |
| 26 | event log_named_string(string key, string val); |
| 27 | |
| 28 | event log_array(uint256[] val); |
| 29 | event log_array(int256[] val); |
| 30 | event log_array(address[] val); |
| 31 | event log_named_array(string key, uint256[] val); |
| 32 | event log_named_array(string key, int256[] val); |
| 33 | event log_named_array(string key, address[] val); |
| 34 | |
| 35 | bytes32 private constant FAILED_SLOT = bytes32("failed"); |
| 36 | |
| 37 | bool private _failed; |
| 38 | |
| 39 | function failed() public view returns (bool) { |
| 40 | if (_failed) { |
| 41 | return true; |
| 42 | } else { |
| 43 | return vm.load(address(vm), FAILED_SLOT) != bytes32(0); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | function fail() internal virtual { |
| 48 | vm.store(address(vm), FAILED_SLOT, bytes32(uint256(1))); |
| 49 | _failed = true; |
| 50 | } |
| 51 | |
| 52 | function fail(string memory message) internal virtual { |
| 53 | fail(); |
| 54 | vm.assertTrue(false, message); |
| 55 | } |
| 56 | |
| 57 | function assertTrue(bool data) internal pure virtual { |
| 58 | if (!data) { |
| 59 | vm.assertTrue(data); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | function assertTrue(bool data, string memory err) internal pure virtual { |
| 64 | if (!data) { |
| 65 | vm.assertTrue(data, err); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | function assertFalse(bool data) internal pure virtual { |
| 70 | if (data) { |
| 71 | vm.assertFalse(data); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | function assertFalse(bool data, string memory err) internal pure virtual { |
| 76 | if (data) { |
| 77 | vm.assertFalse(data, err); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | function assertEq(bool left, bool right) internal pure virtual { |
| 82 | if (left != right) { |
| 83 | vm.assertEq(left, right); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | function assertEq(bool left, bool right, string memory err) internal pure virtual { |
| 88 | if (left != right) { |
| 89 | vm.assertEq(left, right, err); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | function assertEq(uint256 left, uint256 right) internal pure virtual { |
| 94 | if (left != right) { |
| 95 | vm.assertEq(left, right); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | function assertEq(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 100 | if (left != right) { |
| 101 | vm.assertEq(left, right, err); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 106 | vm.assertEqDecimal(left, right, decimals); |
| 107 | } |
| 108 | |
| 109 | function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { |
| 110 | vm.assertEqDecimal(left, right, decimals, err); |
| 111 | } |
| 112 | |
| 113 | function assertEq(int256 left, int256 right) internal pure virtual { |
| 114 | if (left != right) { |
| 115 | vm.assertEq(left, right); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | function assertEq(int256 left, int256 right, string memory err) internal pure virtual { |
| 120 | if (left != right) { |
| 121 | vm.assertEq(left, right, err); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | function assertEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 126 | vm.assertEqDecimal(left, right, decimals); |
| 127 | } |
| 128 | |
| 129 | function assertEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 130 | vm.assertEqDecimal(left, right, decimals, err); |
| 131 | } |
| 132 | |
| 133 | function assertEq(address left, address right) internal pure virtual { |
| 134 | if (left != right) { |
| 135 | vm.assertEq(left, right); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | function assertEq(address left, address right, string memory err) internal pure virtual { |
| 140 | if (left != right) { |
| 141 | vm.assertEq(left, right, err); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | function assertEq(bytes32 left, bytes32 right) internal pure virtual { |
| 146 | if (left != right) { |
| 147 | vm.assertEq(left, right); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | function assertEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { |
| 152 | if (left != right) { |
| 153 | vm.assertEq(left, right, err); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | function assertEq32(bytes32 left, bytes32 right) internal pure virtual { |
| 158 | if (left != right) { |
| 159 | vm.assertEq(left, right); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | function assertEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { |
| 164 | if (left != right) { |
| 165 | vm.assertEq(left, right, err); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | function assertEq(string memory left, string memory right) internal pure virtual { |
| 170 | vm.assertEq(left, right); |
| 171 | } |
| 172 | |
| 173 | function assertEq(string memory left, string memory right, string memory err) internal pure virtual { |
| 174 | vm.assertEq(left, right, err); |
| 175 | } |
| 176 | |
| 177 | function assertEq(bytes memory left, bytes memory right) internal pure virtual { |
| 178 | vm.assertEq(left, right); |
| 179 | } |
| 180 | |
| 181 | function assertEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { |
| 182 | vm.assertEq(left, right, err); |
| 183 | } |
| 184 | |
| 185 | function assertEq(bool[] memory left, bool[] memory right) internal pure virtual { |
| 186 | vm.assertEq(left, right); |
| 187 | } |
| 188 | |
| 189 | function assertEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { |
| 190 | vm.assertEq(left, right, err); |
| 191 | } |
| 192 | |
| 193 | function assertEq(uint256[] memory left, uint256[] memory right) internal pure virtual { |
| 194 | vm.assertEq(left, right); |
| 195 | } |
| 196 | |
| 197 | function assertEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { |
| 198 | vm.assertEq(left, right, err); |
| 199 | } |
| 200 | |
| 201 | function assertEq(int256[] memory left, int256[] memory right) internal pure virtual { |
| 202 | vm.assertEq(left, right); |
| 203 | } |
| 204 | |
| 205 | function assertEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { |
| 206 | vm.assertEq(left, right, err); |
| 207 | } |
| 208 | |
| 209 | function assertEq(address[] memory left, address[] memory right) internal pure virtual { |
| 210 | vm.assertEq(left, right); |
| 211 | } |
| 212 | |
| 213 | function assertEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { |
| 214 | vm.assertEq(left, right, err); |
| 215 | } |
| 216 | |
| 217 | function assertEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { |
| 218 | vm.assertEq(left, right); |
| 219 | } |
| 220 | |
| 221 | function assertEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { |
| 222 | vm.assertEq(left, right, err); |
| 223 | } |
| 224 | |
| 225 | function assertEq(string[] memory left, string[] memory right) internal pure virtual { |
| 226 | vm.assertEq(left, right); |
| 227 | } |
| 228 | |
| 229 | function assertEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { |
| 230 | vm.assertEq(left, right, err); |
| 231 | } |
| 232 | |
| 233 | function assertEq(bytes[] memory left, bytes[] memory right) internal pure virtual { |
| 234 | vm.assertEq(left, right); |
| 235 | } |
| 236 | |
| 237 | function assertEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { |
| 238 | vm.assertEq(left, right, err); |
| 239 | } |
| 240 | |
| 241 | // Legacy helper |
| 242 | function assertEqUint(uint256 left, uint256 right) internal pure virtual { |
| 243 | assertEq(left, right); |
| 244 | } |
| 245 | |
| 246 | function assertNotEq(bool left, bool right) internal pure virtual { |
| 247 | if (left == right) { |
| 248 | vm.assertNotEq(left, right); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | function assertNotEq(bool left, bool right, string memory err) internal pure virtual { |
| 253 | if (left == right) { |
| 254 | vm.assertNotEq(left, right, err); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | function assertNotEq(uint256 left, uint256 right) internal pure virtual { |
| 259 | if (left == right) { |
| 260 | vm.assertNotEq(left, right); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | function assertNotEq(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 265 | if (left == right) { |
| 266 | vm.assertNotEq(left, right, err); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 271 | vm.assertNotEqDecimal(left, right, decimals); |
| 272 | } |
| 273 | |
| 274 | function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) |
| 275 | internal |
| 276 | pure |
| 277 | virtual |
| 278 | { |
| 279 | vm.assertNotEqDecimal(left, right, decimals, err); |
| 280 | } |
| 281 | |
| 282 | function assertNotEq(int256 left, int256 right) internal pure virtual { |
| 283 | if (left == right) { |
| 284 | vm.assertNotEq(left, right); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | function assertNotEq(int256 left, int256 right, string memory err) internal pure virtual { |
| 289 | if (left == right) { |
| 290 | vm.assertNotEq(left, right, err); |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 295 | vm.assertNotEqDecimal(left, right, decimals); |
| 296 | } |
| 297 | |
| 298 | function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 299 | vm.assertNotEqDecimal(left, right, decimals, err); |
| 300 | } |
| 301 | |
| 302 | function assertNotEq(address left, address right) internal pure virtual { |
| 303 | if (left == right) { |
| 304 | vm.assertNotEq(left, right); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | function assertNotEq(address left, address right, string memory err) internal pure virtual { |
| 309 | if (left == right) { |
| 310 | vm.assertNotEq(left, right, err); |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | function assertNotEq(bytes32 left, bytes32 right) internal pure virtual { |
| 315 | if (left == right) { |
| 316 | vm.assertNotEq(left, right); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | function assertNotEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { |
| 321 | if (left == right) { |
| 322 | vm.assertNotEq(left, right, err); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | function assertNotEq32(bytes32 left, bytes32 right) internal pure virtual { |
| 327 | if (left == right) { |
| 328 | vm.assertNotEq(left, right); |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | function assertNotEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { |
| 333 | if (left == right) { |
| 334 | vm.assertNotEq(left, right, err); |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | function assertNotEq(string memory left, string memory right) internal pure virtual { |
| 339 | vm.assertNotEq(left, right); |
| 340 | } |
| 341 | |
| 342 | function assertNotEq(string memory left, string memory right, string memory err) internal pure virtual { |
| 343 | vm.assertNotEq(left, right, err); |
| 344 | } |
| 345 | |
| 346 | function assertNotEq(bytes memory left, bytes memory right) internal pure virtual { |
| 347 | vm.assertNotEq(left, right); |
| 348 | } |
| 349 | |
| 350 | function assertNotEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { |
| 351 | vm.assertNotEq(left, right, err); |
| 352 | } |
| 353 | |
| 354 | function assertNotEq(bool[] memory left, bool[] memory right) internal pure virtual { |
| 355 | vm.assertNotEq(left, right); |
| 356 | } |
| 357 | |
| 358 | function assertNotEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { |
| 359 | vm.assertNotEq(left, right, err); |
| 360 | } |
| 361 | |
| 362 | function assertNotEq(uint256[] memory left, uint256[] memory right) internal pure virtual { |
| 363 | vm.assertNotEq(left, right); |
| 364 | } |
| 365 | |
| 366 | function assertNotEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { |
| 367 | vm.assertNotEq(left, right, err); |
| 368 | } |
| 369 | |
| 370 | function assertNotEq(int256[] memory left, int256[] memory right) internal pure virtual { |
| 371 | vm.assertNotEq(left, right); |
| 372 | } |
| 373 | |
| 374 | function assertNotEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { |
| 375 | vm.assertNotEq(left, right, err); |
| 376 | } |
| 377 | |
| 378 | function assertNotEq(address[] memory left, address[] memory right) internal pure virtual { |
| 379 | vm.assertNotEq(left, right); |
| 380 | } |
| 381 | |
| 382 | function assertNotEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { |
| 383 | vm.assertNotEq(left, right, err); |
| 384 | } |
| 385 | |
| 386 | function assertNotEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { |
| 387 | vm.assertNotEq(left, right); |
| 388 | } |
| 389 | |
| 390 | function assertNotEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { |
| 391 | vm.assertNotEq(left, right, err); |
| 392 | } |
| 393 | |
| 394 | function assertNotEq(string[] memory left, string[] memory right) internal pure virtual { |
| 395 | vm.assertNotEq(left, right); |
| 396 | } |
| 397 | |
| 398 | function assertNotEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { |
| 399 | vm.assertNotEq(left, right, err); |
| 400 | } |
| 401 | |
| 402 | function assertNotEq(bytes[] memory left, bytes[] memory right) internal pure virtual { |
| 403 | vm.assertNotEq(left, right); |
| 404 | } |
| 405 | |
| 406 | function assertNotEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { |
| 407 | vm.assertNotEq(left, right, err); |
| 408 | } |
| 409 | |
| 410 | function assertLt(uint256 left, uint256 right) internal pure virtual { |
| 411 | if (left >= right) { |
| 412 | vm.assertLt(left, right); |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | function assertLt(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 417 | if (left >= right) { |
| 418 | vm.assertLt(left, right, err); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 423 | vm.assertLtDecimal(left, right, decimals); |
| 424 | } |
| 425 | |
| 426 | function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { |
| 427 | vm.assertLtDecimal(left, right, decimals, err); |
| 428 | } |
| 429 | |
| 430 | function assertLt(int256 left, int256 right) internal pure virtual { |
| 431 | if (left >= right) { |
| 432 | vm.assertLt(left, right); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | function assertLt(int256 left, int256 right, string memory err) internal pure virtual { |
| 437 | if (left >= right) { |
| 438 | vm.assertLt(left, right, err); |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | function assertLtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 443 | vm.assertLtDecimal(left, right, decimals); |
| 444 | } |
| 445 | |
| 446 | function assertLtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 447 | vm.assertLtDecimal(left, right, decimals, err); |
| 448 | } |
| 449 | |
| 450 | function assertGt(uint256 left, uint256 right) internal pure virtual { |
| 451 | if (left <= right) { |
| 452 | vm.assertGt(left, right); |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | function assertGt(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 457 | if (left <= right) { |
| 458 | vm.assertGt(left, right, err); |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 463 | vm.assertGtDecimal(left, right, decimals); |
| 464 | } |
| 465 | |
| 466 | function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { |
| 467 | vm.assertGtDecimal(left, right, decimals, err); |
| 468 | } |
| 469 | |
| 470 | function assertGt(int256 left, int256 right) internal pure virtual { |
| 471 | if (left <= right) { |
| 472 | vm.assertGt(left, right); |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | function assertGt(int256 left, int256 right, string memory err) internal pure virtual { |
| 477 | if (left <= right) { |
| 478 | vm.assertGt(left, right, err); |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | function assertGtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 483 | vm.assertGtDecimal(left, right, decimals); |
| 484 | } |
| 485 | |
| 486 | function assertGtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 487 | vm.assertGtDecimal(left, right, decimals, err); |
| 488 | } |
| 489 | |
| 490 | function assertLe(uint256 left, uint256 right) internal pure virtual { |
| 491 | if (left > right) { |
| 492 | vm.assertLe(left, right); |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | function assertLe(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 497 | if (left > right) { |
| 498 | vm.assertLe(left, right, err); |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 503 | vm.assertLeDecimal(left, right, decimals); |
| 504 | } |
| 505 | |
| 506 | function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { |
| 507 | vm.assertLeDecimal(left, right, decimals, err); |
| 508 | } |
| 509 | |
| 510 | function assertLe(int256 left, int256 right) internal pure virtual { |
| 511 | if (left > right) { |
| 512 | vm.assertLe(left, right); |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | function assertLe(int256 left, int256 right, string memory err) internal pure virtual { |
| 517 | if (left > right) { |
| 518 | vm.assertLe(left, right, err); |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | function assertLeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 523 | vm.assertLeDecimal(left, right, decimals); |
| 524 | } |
| 525 | |
| 526 | function assertLeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 527 | vm.assertLeDecimal(left, right, decimals, err); |
| 528 | } |
| 529 | |
| 530 | function assertGe(uint256 left, uint256 right) internal pure virtual { |
| 531 | if (left < right) { |
| 532 | vm.assertGe(left, right); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | function assertGe(uint256 left, uint256 right, string memory err) internal pure virtual { |
| 537 | if (left < right) { |
| 538 | vm.assertGe(left, right, err); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { |
| 543 | vm.assertGeDecimal(left, right, decimals); |
| 544 | } |
| 545 | |
| 546 | function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { |
| 547 | vm.assertGeDecimal(left, right, decimals, err); |
| 548 | } |
| 549 | |
| 550 | function assertGe(int256 left, int256 right) internal pure virtual { |
| 551 | if (left < right) { |
| 552 | vm.assertGe(left, right); |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | function assertGe(int256 left, int256 right, string memory err) internal pure virtual { |
| 557 | if (left < right) { |
| 558 | vm.assertGe(left, right, err); |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | function assertGeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { |
| 563 | vm.assertGeDecimal(left, right, decimals); |
| 564 | } |
| 565 | |
| 566 | function assertGeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { |
| 567 | vm.assertGeDecimal(left, right, decimals, err); |
| 568 | } |
| 569 | |
| 570 | function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) internal pure virtual { |
| 571 | vm.assertApproxEqAbs(left, right, maxDelta); |
| 572 | } |
| 573 | |
| 574 | function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string memory err) internal pure virtual { |
| 575 | vm.assertApproxEqAbs(left, right, maxDelta, err); |
| 576 | } |
| 577 | |
| 578 | function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) |
| 579 | internal |
| 580 | pure |
| 581 | virtual |
| 582 | { |
| 583 | vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); |
| 584 | } |
| 585 | |
| 586 | function assertApproxEqAbsDecimal( |
| 587 | uint256 left, |
| 588 | uint256 right, |
| 589 | uint256 maxDelta, |
| 590 | uint256 decimals, |
| 591 | string memory err |
| 592 | ) internal pure virtual { |
| 593 | vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); |
| 594 | } |
| 595 | |
| 596 | function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) internal pure virtual { |
| 597 | vm.assertApproxEqAbs(left, right, maxDelta); |
| 598 | } |
| 599 | |
| 600 | function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string memory err) internal pure virtual { |
| 601 | vm.assertApproxEqAbs(left, right, maxDelta, err); |
| 602 | } |
| 603 | |
| 604 | function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) |
| 605 | internal |
| 606 | pure |
| 607 | virtual |
| 608 | { |
| 609 | vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); |
| 610 | } |
| 611 | |
| 612 | function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string memory err) |
| 613 | internal |
| 614 | pure |
| 615 | virtual |
| 616 | { |
| 617 | vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); |
| 618 | } |
| 619 | |
| 620 | function assertApproxEqRel( |
| 621 | uint256 left, |
| 622 | uint256 right, |
| 623 | uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% |
| 624 | ) |
| 625 | internal |
| 626 | pure |
| 627 | virtual |
| 628 | { |
| 629 | vm.assertApproxEqRel(left, right, maxPercentDelta); |
| 630 | } |
| 631 | |
| 632 | function assertApproxEqRel( |
| 633 | uint256 left, |
| 634 | uint256 right, |
| 635 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 636 | string memory err |
| 637 | ) |
| 638 | internal |
| 639 | pure |
| 640 | virtual |
| 641 | { |
| 642 | vm.assertApproxEqRel(left, right, maxPercentDelta, err); |
| 643 | } |
| 644 | |
| 645 | function assertApproxEqRelDecimal( |
| 646 | uint256 left, |
| 647 | uint256 right, |
| 648 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 649 | uint256 decimals |
| 650 | ) |
| 651 | internal |
| 652 | pure |
| 653 | virtual |
| 654 | { |
| 655 | vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); |
| 656 | } |
| 657 | |
| 658 | function assertApproxEqRelDecimal( |
| 659 | uint256 left, |
| 660 | uint256 right, |
| 661 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 662 | uint256 decimals, |
| 663 | string memory err |
| 664 | ) internal pure virtual { |
| 665 | vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); |
| 666 | } |
| 667 | |
| 668 | function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) internal pure virtual { |
| 669 | vm.assertApproxEqRel(left, right, maxPercentDelta); |
| 670 | } |
| 671 | |
| 672 | function assertApproxEqRel( |
| 673 | int256 left, |
| 674 | int256 right, |
| 675 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 676 | string memory err |
| 677 | ) |
| 678 | internal |
| 679 | pure |
| 680 | virtual |
| 681 | { |
| 682 | vm.assertApproxEqRel(left, right, maxPercentDelta, err); |
| 683 | } |
| 684 | |
| 685 | function assertApproxEqRelDecimal( |
| 686 | int256 left, |
| 687 | int256 right, |
| 688 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 689 | uint256 decimals |
| 690 | ) |
| 691 | internal |
| 692 | pure |
| 693 | virtual |
| 694 | { |
| 695 | vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); |
| 696 | } |
| 697 | |
| 698 | function assertApproxEqRelDecimal( |
| 699 | int256 left, |
| 700 | int256 right, |
| 701 | uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% |
| 702 | uint256 decimals, |
| 703 | string memory err |
| 704 | ) internal pure virtual { |
| 705 | vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); |
| 706 | } |
| 707 | |
| 708 | // Inherited from DSTest, not used but kept for backwards-compatibility |
| 709 | function checkEq0(bytes memory left, bytes memory right) internal pure returns (bool) { |
| 710 | return keccak256(left) == keccak256(right); |
| 711 | } |
| 712 | |
| 713 | function assertEq0(bytes memory left, bytes memory right) internal pure virtual { |
| 714 | assertEq(left, right); |
| 715 | } |
| 716 | |
| 717 | function assertEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { |
| 718 | assertEq(left, right, err); |
| 719 | } |
| 720 | |
| 721 | function assertNotEq0(bytes memory left, bytes memory right) internal pure virtual { |
| 722 | assertNotEq(left, right); |
| 723 | } |
| 724 | |
| 725 | function assertNotEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { |
| 726 | assertNotEq(left, right, err); |
| 727 | } |
| 728 | |
| 729 | function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual { |
| 730 | assertEqCall(target, callDataA, target, callDataB, true); |
| 731 | } |
| 732 | |
| 733 | function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB) |
| 734 | internal |
| 735 | virtual |
| 736 | { |
| 737 | assertEqCall(targetA, callDataA, targetB, callDataB, true); |
| 738 | } |
| 739 | |
| 740 | function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData) |
| 741 | internal |
| 742 | virtual |
| 743 | { |
| 744 | assertEqCall(target, callDataA, target, callDataB, strictRevertData); |
| 745 | } |
| 746 | |
| 747 | function assertEqCall( |
| 748 | address targetA, |
| 749 | bytes memory callDataA, |
| 750 | address targetB, |
| 751 | bytes memory callDataB, |
| 752 | bool strictRevertData |
| 753 | ) internal virtual { |
| 754 | (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA); |
| 755 | (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB); |
| 756 | |
| 757 | if (successA && successB) { |
| 758 | assertEq(returnDataA, returnDataB, "Call return data does not match"); |
| 759 | } |
| 760 | |
| 761 | if (!successA && !successB && strictRevertData) { |
| 762 | assertEq(returnDataA, returnDataB, "Call revert data does not match"); |
| 763 | } |
| 764 | |
| 765 | if (!successA && successB) { |
| 766 | emit log("Error: Calls were not equal"); |
| 767 | emit log_named_bytes(" Left call revert data", returnDataA); |
| 768 | emit log_named_bytes(" Right call return data", returnDataB); |
| 769 | revert("assertion failed"); |
| 770 | } |
| 771 | |
| 772 | if (successA && !successB) { |
| 773 | emit log("Error: Calls were not equal"); |
| 774 | emit log_named_bytes(" Left call return data", returnDataA); |
| 775 | emit log_named_bytes(" Right call revert data", returnDataB); |
| 776 | revert("assertion failed"); |
| 777 | } |
| 778 | } |
| 779 | } |
| 780 |
0.0%
lib/forge-std/src/StdChains.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {VmSafe} from "./Vm.sol"; |
| 5 | |
| 6 | /** |
| 7 | * StdChains provides information about EVM compatible chains that can be used in scripts/tests. |
| 8 | * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are |
| 9 | * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of |
| 10 | * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the |
| 11 | * alias used in this contract, which can be found as the first argument to the |
| 12 | * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. |
| 13 | * |
| 14 | * There are two main ways to use this contract: |
| 15 | * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or |
| 16 | * `setChain(string memory chainAlias, Chain memory chain)` |
| 17 | * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. |
| 18 | * |
| 19 | * The first time either of those are used, chains are initialized with the default set of RPC URLs. |
| 20 | * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in |
| 21 | * `defaultRpcUrls`. |
| 22 | * |
| 23 | * The `setChain` function is straightforward, and it simply saves off the given chain data. |
| 24 | * |
| 25 | * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say |
| 26 | * we want to retrieve the RPC URL for `mainnet`: |
| 27 | * - If you have specified data with `setChain`, it will return that. |
| 28 | * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it |
| 29 | * is valid (e.g. a URL is specified, or an environment variable is given and exists). |
| 30 | * - If neither of the above conditions is met, the default data is returned. |
| 31 | * |
| 32 | * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults. |
| 33 | */ |
| 34 | abstract contract StdChains { |
| 35 | VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 36 | |
| 37 | bool private stdChainsInitialized; |
| 38 | |
| 39 | struct ChainData { |
| 40 | string name; |
| 41 | uint256 chainId; |
| 42 | string rpcUrl; |
| 43 | } |
| 44 | |
| 45 | struct Chain { |
| 46 | // The chain name. |
| 47 | string name; |
| 48 | // The chain's Chain ID. |
| 49 | uint256 chainId; |
| 50 | // The chain's alias. (i.e. what gets specified in `foundry.toml`). |
| 51 | string chainAlias; |
| 52 | // A default RPC endpoint for this chain. |
| 53 | // NOTE: This default RPC URL is included for convenience to facilitate quick tests and |
| 54 | // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy |
| 55 | // usage as you will be throttled and this is a disservice to others who need this endpoint. |
| 56 | string rpcUrl; |
| 57 | } |
| 58 | |
| 59 | // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data. |
| 60 | mapping(string => Chain) private chains; |
| 61 | // Maps from the chain's alias to it's default RPC URL. |
| 62 | mapping(string => string) private defaultRpcUrls; |
| 63 | // Maps from a chain ID to it's alias. |
| 64 | mapping(uint256 => string) private idToAlias; |
| 65 | |
| 66 | bool private fallbackToDefaultRpcUrls = true; |
| 67 | |
| 68 | // The RPC URL will be fetched from config or defaultRpcUrls if possible. |
| 69 | function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) { |
| 70 | require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string."); |
| 71 | |
| 72 | initializeStdChains(); |
| 73 | chain = chains[chainAlias]; |
| 74 | require( |
| 75 | chain.chainId != 0, |
| 76 | string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found.")) |
| 77 | ); |
| 78 | |
| 79 | chain = getChainWithUpdatedRpcUrl(chainAlias, chain); |
| 80 | } |
| 81 | |
| 82 | function getChain(uint256 chainId) internal virtual returns (Chain memory chain) { |
| 83 | require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0."); |
| 84 | initializeStdChains(); |
| 85 | string memory chainAlias = idToAlias[chainId]; |
| 86 | |
| 87 | chain = chains[chainAlias]; |
| 88 | |
| 89 | require( |
| 90 | chain.chainId != 0, |
| 91 | string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found.")) |
| 92 | ); |
| 93 | |
| 94 | chain = getChainWithUpdatedRpcUrl(chainAlias, chain); |
| 95 | } |
| 96 | |
| 97 | // set chain info, with priority to argument's rpcUrl field. |
| 98 | function setChain(string memory chainAlias, ChainData memory chain) internal virtual { |
| 99 | require( |
| 100 | bytes(chainAlias).length != 0, |
| 101 | "StdChains setChain(string,ChainData): Chain alias cannot be the empty string." |
| 102 | ); |
| 103 | |
| 104 | require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0."); |
| 105 | |
| 106 | initializeStdChains(); |
| 107 | string memory foundAlias = idToAlias[chain.chainId]; |
| 108 | |
| 109 | require( |
| 110 | bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)), |
| 111 | string( |
| 112 | abi.encodePacked( |
| 113 | "StdChains setChain(string,ChainData): Chain ID ", |
| 114 | vm.toString(chain.chainId), |
| 115 | " already used by \"", |
| 116 | foundAlias, |
| 117 | "\"." |
| 118 | ) |
| 119 | ) |
| 120 | ); |
| 121 | |
| 122 | uint256 oldChainId = chains[chainAlias].chainId; |
| 123 | delete idToAlias[oldChainId]; |
| 124 | |
| 125 | chains[chainAlias] = |
| 126 | Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl}); |
| 127 | idToAlias[chain.chainId] = chainAlias; |
| 128 | } |
| 129 | |
| 130 | // set chain info, with priority to argument's rpcUrl field. |
| 131 | function setChain(string memory chainAlias, Chain memory chain) internal virtual { |
| 132 | setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl})); |
| 133 | } |
| 134 | |
| 135 | function _toUpper(string memory str) private pure returns (string memory) { |
| 136 | bytes memory strb = bytes(str); |
| 137 | bytes memory copy = new bytes(strb.length); |
| 138 | for (uint256 i = 0; i < strb.length; i++) { |
| 139 | bytes1 b = strb[i]; |
| 140 | if (b >= 0x61 && b <= 0x7A) { |
| 141 | copy[i] = bytes1(uint8(b) - 32); |
| 142 | } else { |
| 143 | copy[i] = b; |
| 144 | } |
| 145 | } |
| 146 | return string(copy); |
| 147 | } |
| 148 | |
| 149 | // lookup rpcUrl, in descending order of priority: |
| 150 | // current -> config (foundry.toml) -> environment variable -> default |
| 151 | function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) |
| 152 | private |
| 153 | view |
| 154 | returns (Chain memory) |
| 155 | { |
| 156 | if (bytes(chain.rpcUrl).length == 0) { |
| 157 | try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) { |
| 158 | chain.rpcUrl = configRpcUrl; |
| 159 | } catch (bytes memory err) { |
| 160 | string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL")); |
| 161 | if (fallbackToDefaultRpcUrls) { |
| 162 | chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]); |
| 163 | } else { |
| 164 | chain.rpcUrl = vm.envString(envName); |
| 165 | } |
| 166 | // Distinguish 'not found' from 'cannot read' |
| 167 | // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions |
| 168 | bytes memory oldNotFoundError = |
| 169 | abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias))); |
| 170 | bytes memory newNotFoundError = abi.encodeWithSignature( |
| 171 | "CheatcodeError(string)", string(abi.encodePacked("invalid rpc url: ", chainAlias)) |
| 172 | ); |
| 173 | bytes32 errHash = keccak256(err); |
| 174 | if ( |
| 175 | (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError)) |
| 176 | || bytes(chain.rpcUrl).length == 0 |
| 177 | ) { |
| 178 | assembly ("memory-safe") { |
| 179 | revert(add(32, err), mload(err)) |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | return chain; |
| 185 | } |
| 186 | |
| 187 | function setFallbackToDefaultRpcUrls(bool useDefault) internal { |
| 188 | fallbackToDefaultRpcUrls = useDefault; |
| 189 | } |
| 190 | |
| 191 | function initializeStdChains() private { |
| 192 | if (stdChainsInitialized) return; |
| 193 | |
| 194 | stdChainsInitialized = true; |
| 195 | |
| 196 | // If adding an RPC here, make sure to test the default RPC URL in `test_Rpcs` in `StdChains.t.sol` |
| 197 | setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545")); |
| 198 | setChainWithDefaultRpcUrl("mainnet", ChainData("Mainnet", 1, "https://eth.llamarpc.com")); |
| 199 | setChainWithDefaultRpcUrl( |
| 200 | "sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") |
| 201 | ); |
| 202 | setChainWithDefaultRpcUrl("holesky", ChainData("Holesky", 17000, "https://rpc.holesky.ethpandaops.io")); |
| 203 | setChainWithDefaultRpcUrl("hoodi", ChainData("Hoodi", 560048, "https://rpc.hoodi.ethpandaops.io")); |
| 204 | setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io")); |
| 205 | setChainWithDefaultRpcUrl( |
| 206 | "optimism_sepolia", ChainData("Optimism Sepolia", 11155420, "https://sepolia.optimism.io") |
| 207 | ); |
| 208 | setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc")); |
| 209 | setChainWithDefaultRpcUrl( |
| 210 | "arbitrum_one_sepolia", ChainData("Arbitrum One Sepolia", 421614, "https://sepolia-rollup.arbitrum.io/rpc") |
| 211 | ); |
| 212 | setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc")); |
| 213 | setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com")); |
| 214 | setChainWithDefaultRpcUrl( |
| 215 | "polygon_amoy", ChainData("Polygon Amoy", 80002, "https://rpc-amoy.polygon.technology") |
| 216 | ); |
| 217 | setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc")); |
| 218 | setChainWithDefaultRpcUrl( |
| 219 | "avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc") |
| 220 | ); |
| 221 | setChainWithDefaultRpcUrl( |
| 222 | "bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org") |
| 223 | ); |
| 224 | setChainWithDefaultRpcUrl( |
| 225 | "bnb_smart_chain_testnet", |
| 226 | ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel") |
| 227 | ); |
| 228 | setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com")); |
| 229 | setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network")); |
| 230 | setChainWithDefaultRpcUrl( |
| 231 | "moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network") |
| 232 | ); |
| 233 | setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network")); |
| 234 | setChainWithDefaultRpcUrl("base_sepolia", ChainData("Base Sepolia", 84532, "https://sepolia.base.org")); |
| 235 | setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org")); |
| 236 | setChainWithDefaultRpcUrl("blast_sepolia", ChainData("Blast Sepolia", 168587773, "https://sepolia.blast.io")); |
| 237 | setChainWithDefaultRpcUrl("blast", ChainData("Blast", 81457, "https://rpc.blast.io")); |
| 238 | setChainWithDefaultRpcUrl("fantom_opera", ChainData("Fantom Opera", 250, "https://rpc.ankr.com/fantom/")); |
| 239 | setChainWithDefaultRpcUrl( |
| 240 | "fantom_opera_testnet", ChainData("Fantom Opera Testnet", 4002, "https://rpc.ankr.com/fantom_testnet/") |
| 241 | ); |
| 242 | setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com")); |
| 243 | setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com")); |
| 244 | setChainWithDefaultRpcUrl( |
| 245 | "berachain_bartio_testnet", ChainData("Berachain bArtio Testnet", 80084, "https://bartio.rpc.berachain.com") |
| 246 | ); |
| 247 | setChainWithDefaultRpcUrl("flare", ChainData("Flare", 14, "https://flare-api.flare.network/ext/C/rpc")); |
| 248 | setChainWithDefaultRpcUrl( |
| 249 | "flare_coston2", ChainData("Flare Coston2", 114, "https://coston2-api.flare.network/ext/C/rpc") |
| 250 | ); |
| 251 | |
| 252 | setChainWithDefaultRpcUrl("ink", ChainData("Ink", 57073, "https://rpc-gel.inkonchain.com")); |
| 253 | setChainWithDefaultRpcUrl( |
| 254 | "ink_sepolia", ChainData("Ink Sepolia", 763373, "https://rpc-gel-sepolia.inkonchain.com") |
| 255 | ); |
| 256 | |
| 257 | setChainWithDefaultRpcUrl("mode", ChainData("Mode", 34443, "https://mode.drpc.org")); |
| 258 | setChainWithDefaultRpcUrl("mode_sepolia", ChainData("Mode Sepolia", 919, "https://sepolia.mode.network")); |
| 259 | |
| 260 | setChainWithDefaultRpcUrl("zora", ChainData("Zora", 7777777, "https://zora.drpc.org")); |
| 261 | setChainWithDefaultRpcUrl( |
| 262 | "zora_sepolia", ChainData("Zora Sepolia", 999999999, "https://sepolia.rpc.zora.energy") |
| 263 | ); |
| 264 | |
| 265 | setChainWithDefaultRpcUrl("race", ChainData("Race", 6805, "https://racemainnet.io")); |
| 266 | setChainWithDefaultRpcUrl("race_sepolia", ChainData("Race Sepolia", 6806, "https://racemainnet.io")); |
| 267 | |
| 268 | setChainWithDefaultRpcUrl("metal", ChainData("Metal", 1750, "https://metall2.drpc.org")); |
| 269 | setChainWithDefaultRpcUrl("metal_sepolia", ChainData("Metal Sepolia", 1740, "https://testnet.rpc.metall2.com")); |
| 270 | |
| 271 | setChainWithDefaultRpcUrl("binary", ChainData("Binary", 624, "https://rpc.zero.thebinaryholdings.com")); |
| 272 | setChainWithDefaultRpcUrl( |
| 273 | "binary_sepolia", ChainData("Binary Sepolia", 625, "https://rpc.zero.thebinaryholdings.com") |
| 274 | ); |
| 275 | |
| 276 | setChainWithDefaultRpcUrl("orderly", ChainData("Orderly", 291, "https://rpc.orderly.network")); |
| 277 | setChainWithDefaultRpcUrl( |
| 278 | "orderly_sepolia", ChainData("Orderly Sepolia", 4460, "https://testnet-rpc.orderly.org") |
| 279 | ); |
| 280 | |
| 281 | setChainWithDefaultRpcUrl("unichain", ChainData("Unichain", 130, "https://mainnet.unichain.org")); |
| 282 | setChainWithDefaultRpcUrl( |
| 283 | "unichain_sepolia", ChainData("Unichain Sepolia", 1301, "https://sepolia.unichain.org") |
| 284 | ); |
| 285 | } |
| 286 | |
| 287 | // set chain info, with priority to chainAlias' rpc url in foundry.toml |
| 288 | function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private { |
| 289 | string memory rpcUrl = chain.rpcUrl; |
| 290 | defaultRpcUrls[chainAlias] = rpcUrl; |
| 291 | chain.rpcUrl = ""; |
| 292 | setChain(chainAlias, chain); |
| 293 | chain.rpcUrl = rpcUrl; // restore argument |
| 294 | } |
| 295 | } |
| 296 |
0.0%
lib/forge-std/src/StdCheats.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {StdStorage, stdStorage} from "./StdStorage.sol"; |
| 5 | import {console2} from "./console2.sol"; |
| 6 | import {Vm} from "./Vm.sol"; |
| 7 | |
| 8 | abstract contract StdCheatsSafe { |
| 9 | Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 10 | |
| 11 | uint256 private constant UINT256_MAX = |
| 12 | 115792089237316195423570985008687907853269984665640564039457584007913129639935; |
| 13 | |
| 14 | bool private gasMeteringOff; |
| 15 | |
| 16 | // Data structures to parse Transaction objects from the broadcast artifact |
| 17 | // that conform to EIP1559. The Raw structs is what is parsed from the JSON |
| 18 | // and then converted to the one that is used by the user for better UX. |
| 19 | |
| 20 | struct RawTx1559 { |
| 21 | string[] arguments; |
| 22 | address contractAddress; |
| 23 | string contractName; |
| 24 | // json value name = function |
| 25 | string functionSig; |
| 26 | bytes32 hash; |
| 27 | // json value name = tx |
| 28 | RawTx1559Detail txDetail; |
| 29 | // json value name = type |
| 30 | string opcode; |
| 31 | } |
| 32 | |
| 33 | struct RawTx1559Detail { |
| 34 | AccessList[] accessList; |
| 35 | bytes data; |
| 36 | address from; |
| 37 | bytes gas; |
| 38 | bytes nonce; |
| 39 | address to; |
| 40 | bytes txType; |
| 41 | bytes value; |
| 42 | } |
| 43 | |
| 44 | struct Tx1559 { |
| 45 | string[] arguments; |
| 46 | address contractAddress; |
| 47 | string contractName; |
| 48 | string functionSig; |
| 49 | bytes32 hash; |
| 50 | Tx1559Detail txDetail; |
| 51 | string opcode; |
| 52 | } |
| 53 | |
| 54 | struct Tx1559Detail { |
| 55 | AccessList[] accessList; |
| 56 | bytes data; |
| 57 | address from; |
| 58 | uint256 gas; |
| 59 | uint256 nonce; |
| 60 | address to; |
| 61 | uint256 txType; |
| 62 | uint256 value; |
| 63 | } |
| 64 | |
| 65 | // Data structures to parse Transaction objects from the broadcast artifact |
| 66 | // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON |
| 67 | // and then converted to the one that is used by the user for better UX. |
| 68 | |
| 69 | struct TxLegacy { |
| 70 | string[] arguments; |
| 71 | address contractAddress; |
| 72 | string contractName; |
| 73 | string functionSig; |
| 74 | string hash; |
| 75 | string opcode; |
| 76 | TxDetailLegacy transaction; |
| 77 | } |
| 78 | |
| 79 | struct TxDetailLegacy { |
| 80 | AccessList[] accessList; |
| 81 | uint256 chainId; |
| 82 | bytes data; |
| 83 | address from; |
| 84 | uint256 gas; |
| 85 | uint256 gasPrice; |
| 86 | bytes32 hash; |
| 87 | uint256 nonce; |
| 88 | bytes1 opcode; |
| 89 | bytes32 r; |
| 90 | bytes32 s; |
| 91 | uint256 txType; |
| 92 | address to; |
| 93 | uint8 v; |
| 94 | uint256 value; |
| 95 | } |
| 96 | |
| 97 | struct AccessList { |
| 98 | address accessAddress; |
| 99 | bytes32[] storageKeys; |
| 100 | } |
| 101 | |
| 102 | // Data structures to parse Receipt objects from the broadcast artifact. |
| 103 | // The Raw structs is what is parsed from the JSON |
| 104 | // and then converted to the one that is used by the user for better UX. |
| 105 | |
| 106 | struct RawReceipt { |
| 107 | bytes32 blockHash; |
| 108 | bytes blockNumber; |
| 109 | address contractAddress; |
| 110 | bytes cumulativeGasUsed; |
| 111 | bytes effectiveGasPrice; |
| 112 | address from; |
| 113 | bytes gasUsed; |
| 114 | RawReceiptLog[] logs; |
| 115 | bytes logsBloom; |
| 116 | bytes status; |
| 117 | address to; |
| 118 | bytes32 transactionHash; |
| 119 | bytes transactionIndex; |
| 120 | } |
| 121 | |
| 122 | struct Receipt { |
| 123 | bytes32 blockHash; |
| 124 | uint256 blockNumber; |
| 125 | address contractAddress; |
| 126 | uint256 cumulativeGasUsed; |
| 127 | uint256 effectiveGasPrice; |
| 128 | address from; |
| 129 | uint256 gasUsed; |
| 130 | ReceiptLog[] logs; |
| 131 | bytes logsBloom; |
| 132 | uint256 status; |
| 133 | address to; |
| 134 | bytes32 transactionHash; |
| 135 | uint256 transactionIndex; |
| 136 | } |
| 137 | |
| 138 | // Data structures to parse the entire broadcast artifact, assuming the |
| 139 | // transactions conform to EIP1559. |
| 140 | |
| 141 | struct EIP1559ScriptArtifact { |
| 142 | string[] libraries; |
| 143 | string path; |
| 144 | string[] pending; |
| 145 | Receipt[] receipts; |
| 146 | uint256 timestamp; |
| 147 | Tx1559[] transactions; |
| 148 | TxReturn[] txReturns; |
| 149 | } |
| 150 | |
| 151 | struct RawEIP1559ScriptArtifact { |
| 152 | string[] libraries; |
| 153 | string path; |
| 154 | string[] pending; |
| 155 | RawReceipt[] receipts; |
| 156 | TxReturn[] txReturns; |
| 157 | uint256 timestamp; |
| 158 | RawTx1559[] transactions; |
| 159 | } |
| 160 | |
| 161 | struct RawReceiptLog { |
| 162 | // json value = address |
| 163 | address logAddress; |
| 164 | bytes32 blockHash; |
| 165 | bytes blockNumber; |
| 166 | bytes data; |
| 167 | bytes logIndex; |
| 168 | bool removed; |
| 169 | bytes32[] topics; |
| 170 | bytes32 transactionHash; |
| 171 | bytes transactionIndex; |
| 172 | bytes transactionLogIndex; |
| 173 | } |
| 174 | |
| 175 | struct ReceiptLog { |
| 176 | // json value = address |
| 177 | address logAddress; |
| 178 | bytes32 blockHash; |
| 179 | uint256 blockNumber; |
| 180 | bytes data; |
| 181 | uint256 logIndex; |
| 182 | bytes32[] topics; |
| 183 | uint256 transactionIndex; |
| 184 | uint256 transactionLogIndex; |
| 185 | bool removed; |
| 186 | } |
| 187 | |
| 188 | struct TxReturn { |
| 189 | string internalType; |
| 190 | string value; |
| 191 | } |
| 192 | |
| 193 | struct Account { |
| 194 | address addr; |
| 195 | uint256 key; |
| 196 | } |
| 197 | |
| 198 | enum AddressType { |
| 199 | Payable, |
| 200 | NonPayable, |
| 201 | ZeroAddress, |
| 202 | Precompile, |
| 203 | ForgeAddress |
| 204 | } |
| 205 | |
| 206 | // Checks that `addr` is not blacklisted by token contracts that have a blacklist. |
| 207 | function assumeNotBlacklisted(address token, address addr) internal view virtual { |
| 208 | // Nothing to check if `token` is not a contract. |
| 209 | uint256 tokenCodeSize; |
| 210 | assembly { |
| 211 | tokenCodeSize := extcodesize(token) |
| 212 | } |
| 213 | require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); |
| 214 | |
| 215 | bool success; |
| 216 | bytes memory returnData; |
| 217 | |
| 218 | // 4-byte selector for `isBlacklisted(address)`, used by USDC. |
| 219 | (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr)); |
| 220 | vm.assume(!success || abi.decode(returnData, (bool)) == false); |
| 221 | |
| 222 | // 4-byte selector for `isBlackListed(address)`, used by USDT. |
| 223 | (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr)); |
| 224 | vm.assume(!success || abi.decode(returnData, (bool)) == false); |
| 225 | } |
| 226 | |
| 227 | // Checks that `addr` is not blacklisted by token contracts that have a blacklist. |
| 228 | // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for |
| 229 | // backwards compatibility, since this name was used in the original PR which already has |
| 230 | // a release. This function can be removed in a future release once we want a breaking change. |
| 231 | function assumeNoBlacklisted(address token, address addr) internal view virtual { |
| 232 | assumeNotBlacklisted(token, addr); |
| 233 | } |
| 234 | |
| 235 | function assumeAddressIsNot(address addr, AddressType addressType) internal virtual { |
| 236 | if (addressType == AddressType.Payable) { |
| 237 | assumeNotPayable(addr); |
| 238 | } else if (addressType == AddressType.NonPayable) { |
| 239 | assumePayable(addr); |
| 240 | } else if (addressType == AddressType.ZeroAddress) { |
| 241 | assumeNotZeroAddress(addr); |
| 242 | } else if (addressType == AddressType.Precompile) { |
| 243 | assumeNotPrecompile(addr); |
| 244 | } else if (addressType == AddressType.ForgeAddress) { |
| 245 | assumeNotForgeAddress(addr); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual { |
| 250 | assumeAddressIsNot(addr, addressType1); |
| 251 | assumeAddressIsNot(addr, addressType2); |
| 252 | } |
| 253 | |
| 254 | function assumeAddressIsNot( |
| 255 | address addr, |
| 256 | AddressType addressType1, |
| 257 | AddressType addressType2, |
| 258 | AddressType addressType3 |
| 259 | ) internal virtual { |
| 260 | assumeAddressIsNot(addr, addressType1); |
| 261 | assumeAddressIsNot(addr, addressType2); |
| 262 | assumeAddressIsNot(addr, addressType3); |
| 263 | } |
| 264 | |
| 265 | function assumeAddressIsNot( |
| 266 | address addr, |
| 267 | AddressType addressType1, |
| 268 | AddressType addressType2, |
| 269 | AddressType addressType3, |
| 270 | AddressType addressType4 |
| 271 | ) internal virtual { |
| 272 | assumeAddressIsNot(addr, addressType1); |
| 273 | assumeAddressIsNot(addr, addressType2); |
| 274 | assumeAddressIsNot(addr, addressType3); |
| 275 | assumeAddressIsNot(addr, addressType4); |
| 276 | } |
| 277 | |
| 278 | // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to |
| 279 | // `addr` and checking the `success` return value. |
| 280 | // NOTE: This function may result in state changes depending on the fallback/receive logic |
| 281 | // implemented by `addr`, which should be taken into account when this function is used. |
| 282 | function _isPayable(address addr) private returns (bool) { |
| 283 | require( |
| 284 | addr.balance < UINT256_MAX, |
| 285 | "StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds" |
| 286 | ); |
| 287 | uint256 origBalanceTest = address(this).balance; |
| 288 | uint256 origBalanceAddr = address(addr).balance; |
| 289 | |
| 290 | vm.deal(address(this), 1); |
| 291 | (bool success,) = payable(addr).call{value: 1}(""); |
| 292 | |
| 293 | // reset balances |
| 294 | vm.deal(address(this), origBalanceTest); |
| 295 | vm.deal(addr, origBalanceAddr); |
| 296 | |
| 297 | return success; |
| 298 | } |
| 299 | |
| 300 | // NOTE: This function may result in state changes depending on the fallback/receive logic |
| 301 | // implemented by `addr`, which should be taken into account when this function is used. See the |
| 302 | // `_isPayable` method for more information. |
| 303 | function assumePayable(address addr) internal virtual { |
| 304 | vm.assume(_isPayable(addr)); |
| 305 | } |
| 306 | |
| 307 | function assumeNotPayable(address addr) internal virtual { |
| 308 | vm.assume(!_isPayable(addr)); |
| 309 | } |
| 310 | |
| 311 | function assumeNotZeroAddress(address addr) internal pure virtual { |
| 312 | vm.assume(addr != address(0)); |
| 313 | } |
| 314 | |
| 315 | function assumeNotPrecompile(address addr) internal pure virtual { |
| 316 | assumeNotPrecompile(addr, _pureChainId()); |
| 317 | } |
| 318 | |
| 319 | function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual { |
| 320 | // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific |
| 321 | // address), but the same rationale for excluding them applies so we include those too. |
| 322 | |
| 323 | // These are reserved by Ethereum and may be on all EVM-compatible chains. |
| 324 | vm.assume(addr < address(0x1) || addr > address(0xff)); |
| 325 | |
| 326 | // forgefmt: disable-start |
| 327 | if (chainId == 10 || chainId == 420 || chainId == 11155420) { |
| 328 | // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21 |
| 329 | vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800)); |
| 330 | } else if (chainId == 42161 || chainId == 421613) { |
| 331 | // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains |
| 332 | vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068)); |
| 333 | } else if (chainId == 43114 || chainId == 43113) { |
| 334 | // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59 |
| 335 | vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff)); |
| 336 | vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF)); |
| 337 | vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff)); |
| 338 | } |
| 339 | // forgefmt: disable-end |
| 340 | } |
| 341 | |
| 342 | function assumeNotForgeAddress(address addr) internal pure virtual { |
| 343 | // vm, console, and Create2Deployer addresses |
| 344 | vm.assume( |
| 345 | addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 |
| 346 | && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C |
| 347 | ); |
| 348 | } |
| 349 | |
| 350 | function assumeUnusedAddress(address addr) internal view virtual { |
| 351 | uint256 size; |
| 352 | assembly { |
| 353 | size := extcodesize(addr) |
| 354 | } |
| 355 | vm.assume(size == 0); |
| 356 | |
| 357 | assumeNotPrecompile(addr); |
| 358 | assumeNotZeroAddress(addr); |
| 359 | assumeNotForgeAddress(addr); |
| 360 | } |
| 361 | |
| 362 | function readEIP1559ScriptArtifact(string memory path) |
| 363 | internal |
| 364 | view |
| 365 | virtual |
| 366 | returns (EIP1559ScriptArtifact memory) |
| 367 | { |
| 368 | string memory data = vm.readFile(path); |
| 369 | bytes memory parsedData = vm.parseJson(data); |
| 370 | RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact)); |
| 371 | EIP1559ScriptArtifact memory artifact; |
| 372 | artifact.libraries = rawArtifact.libraries; |
| 373 | artifact.path = rawArtifact.path; |
| 374 | artifact.timestamp = rawArtifact.timestamp; |
| 375 | artifact.pending = rawArtifact.pending; |
| 376 | artifact.txReturns = rawArtifact.txReturns; |
| 377 | artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts); |
| 378 | artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions); |
| 379 | return artifact; |
| 380 | } |
| 381 | |
| 382 | function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) { |
| 383 | Tx1559[] memory txs = new Tx1559[](rawTxs.length); |
| 384 | for (uint256 i; i < rawTxs.length; i++) { |
| 385 | txs[i] = rawToConvertedEIPTx1559(rawTxs[i]); |
| 386 | } |
| 387 | return txs; |
| 388 | } |
| 389 | |
| 390 | function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) { |
| 391 | Tx1559 memory transaction; |
| 392 | transaction.arguments = rawTx.arguments; |
| 393 | transaction.contractAddress = rawTx.contractAddress; |
| 394 | transaction.contractName = rawTx.contractName; |
| 395 | transaction.functionSig = rawTx.functionSig; |
| 396 | transaction.hash = rawTx.hash; |
| 397 | transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail); |
| 398 | transaction.opcode = rawTx.opcode; |
| 399 | return transaction; |
| 400 | } |
| 401 | |
| 402 | function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail) |
| 403 | internal |
| 404 | pure |
| 405 | virtual |
| 406 | returns (Tx1559Detail memory) |
| 407 | { |
| 408 | Tx1559Detail memory txDetail; |
| 409 | txDetail.data = rawDetail.data; |
| 410 | txDetail.from = rawDetail.from; |
| 411 | txDetail.to = rawDetail.to; |
| 412 | txDetail.nonce = _bytesToUint(rawDetail.nonce); |
| 413 | txDetail.txType = _bytesToUint(rawDetail.txType); |
| 414 | txDetail.value = _bytesToUint(rawDetail.value); |
| 415 | txDetail.gas = _bytesToUint(rawDetail.gas); |
| 416 | txDetail.accessList = rawDetail.accessList; |
| 417 | return txDetail; |
| 418 | } |
| 419 | |
| 420 | function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) { |
| 421 | string memory deployData = vm.readFile(path); |
| 422 | bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions"); |
| 423 | RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[])); |
| 424 | return rawToConvertedEIPTx1559s(rawTxs); |
| 425 | } |
| 426 | |
| 427 | function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) { |
| 428 | string memory deployData = vm.readFile(path); |
| 429 | string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]")); |
| 430 | bytes memory parsedDeployData = vm.parseJson(deployData, key); |
| 431 | RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559)); |
| 432 | return rawToConvertedEIPTx1559(rawTx); |
| 433 | } |
| 434 | |
| 435 | // Analogous to readTransactions, but for receipts. |
| 436 | function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) { |
| 437 | string memory deployData = vm.readFile(path); |
| 438 | bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts"); |
| 439 | RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[])); |
| 440 | return rawToConvertedReceipts(rawReceipts); |
| 441 | } |
| 442 | |
| 443 | function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) { |
| 444 | string memory deployData = vm.readFile(path); |
| 445 | string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]")); |
| 446 | bytes memory parsedDeployData = vm.parseJson(deployData, key); |
| 447 | RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt)); |
| 448 | return rawToConvertedReceipt(rawReceipt); |
| 449 | } |
| 450 | |
| 451 | function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) { |
| 452 | Receipt[] memory receipts = new Receipt[](rawReceipts.length); |
| 453 | for (uint256 i; i < rawReceipts.length; i++) { |
| 454 | receipts[i] = rawToConvertedReceipt(rawReceipts[i]); |
| 455 | } |
| 456 | return receipts; |
| 457 | } |
| 458 | |
| 459 | function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) { |
| 460 | Receipt memory receipt; |
| 461 | receipt.blockHash = rawReceipt.blockHash; |
| 462 | receipt.to = rawReceipt.to; |
| 463 | receipt.from = rawReceipt.from; |
| 464 | receipt.contractAddress = rawReceipt.contractAddress; |
| 465 | receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice); |
| 466 | receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed); |
| 467 | receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed); |
| 468 | receipt.status = _bytesToUint(rawReceipt.status); |
| 469 | receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex); |
| 470 | receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber); |
| 471 | receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs); |
| 472 | receipt.logsBloom = rawReceipt.logsBloom; |
| 473 | receipt.transactionHash = rawReceipt.transactionHash; |
| 474 | return receipt; |
| 475 | } |
| 476 | |
| 477 | function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs) |
| 478 | internal |
| 479 | pure |
| 480 | virtual |
| 481 | returns (ReceiptLog[] memory) |
| 482 | { |
| 483 | ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length); |
| 484 | for (uint256 i; i < rawLogs.length; i++) { |
| 485 | logs[i].logAddress = rawLogs[i].logAddress; |
| 486 | logs[i].blockHash = rawLogs[i].blockHash; |
| 487 | logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber); |
| 488 | logs[i].data = rawLogs[i].data; |
| 489 | logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex); |
| 490 | logs[i].topics = rawLogs[i].topics; |
| 491 | logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex); |
| 492 | logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex); |
| 493 | logs[i].removed = rawLogs[i].removed; |
| 494 | } |
| 495 | return logs; |
| 496 | } |
| 497 | |
| 498 | // Deploy a contract by fetching the contract bytecode from |
| 499 | // the artifacts directory |
| 500 | // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))` |
| 501 | function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) { |
| 502 | bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); |
| 503 | assembly ("memory-safe") { |
| 504 | addr := create(0, add(bytecode, 0x20), mload(bytecode)) |
| 505 | } |
| 506 | |
| 507 | require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed."); |
| 508 | } |
| 509 | |
| 510 | function deployCode(string memory what) internal virtual returns (address addr) { |
| 511 | bytes memory bytecode = vm.getCode(what); |
| 512 | assembly ("memory-safe") { |
| 513 | addr := create(0, add(bytecode, 0x20), mload(bytecode)) |
| 514 | } |
| 515 | |
| 516 | require(addr != address(0), "StdCheats deployCode(string): Deployment failed."); |
| 517 | } |
| 518 | |
| 519 | /// @dev deploy contract with value on construction |
| 520 | function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) { |
| 521 | bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); |
| 522 | assembly ("memory-safe") { |
| 523 | addr := create(val, add(bytecode, 0x20), mload(bytecode)) |
| 524 | } |
| 525 | |
| 526 | require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed."); |
| 527 | } |
| 528 | |
| 529 | function deployCode(string memory what, uint256 val) internal virtual returns (address addr) { |
| 530 | bytes memory bytecode = vm.getCode(what); |
| 531 | assembly ("memory-safe") { |
| 532 | addr := create(val, add(bytecode, 0x20), mload(bytecode)) |
| 533 | } |
| 534 | |
| 535 | require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed."); |
| 536 | } |
| 537 | |
| 538 | // creates a labeled address and the corresponding private key |
| 539 | function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) { |
| 540 | privateKey = uint256(keccak256(abi.encodePacked(name))); |
| 541 | addr = vm.addr(privateKey); |
| 542 | vm.label(addr, name); |
| 543 | } |
| 544 | |
| 545 | // creates a labeled address |
| 546 | function makeAddr(string memory name) internal virtual returns (address addr) { |
| 547 | (addr,) = makeAddrAndKey(name); |
| 548 | } |
| 549 | |
| 550 | // Destroys an account immediately, sending the balance to beneficiary. |
| 551 | // Destroying means: balance will be zero, code will be empty, and nonce will be 0 |
| 552 | // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce |
| 553 | // only after tx ends, this will run immediately. |
| 554 | function destroyAccount(address who, address beneficiary) internal virtual { |
| 555 | uint256 currBalance = who.balance; |
| 556 | vm.etch(who, abi.encode()); |
| 557 | vm.deal(who, 0); |
| 558 | vm.resetNonce(who); |
| 559 | |
| 560 | uint256 beneficiaryBalance = beneficiary.balance; |
| 561 | vm.deal(beneficiary, currBalance + beneficiaryBalance); |
| 562 | } |
| 563 | |
| 564 | // creates a struct containing both a labeled address and the corresponding private key |
| 565 | function makeAccount(string memory name) internal virtual returns (Account memory account) { |
| 566 | (account.addr, account.key) = makeAddrAndKey(name); |
| 567 | } |
| 568 | |
| 569 | function deriveRememberKey(string memory mnemonic, uint32 index) |
| 570 | internal |
| 571 | virtual |
| 572 | returns (address who, uint256 privateKey) |
| 573 | { |
| 574 | privateKey = vm.deriveKey(mnemonic, index); |
| 575 | who = vm.rememberKey(privateKey); |
| 576 | } |
| 577 | |
| 578 | function _bytesToUint(bytes memory b) private pure returns (uint256) { |
| 579 | require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32."); |
| 580 | return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); |
| 581 | } |
| 582 | |
| 583 | function isFork() internal view virtual returns (bool status) { |
| 584 | try vm.activeFork() { |
| 585 | status = true; |
| 586 | } catch (bytes memory) {} |
| 587 | } |
| 588 | |
| 589 | modifier skipWhenForking() { |
| 590 | if (!isFork()) { |
| 591 | _; |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | modifier skipWhenNotForking() { |
| 596 | if (isFork()) { |
| 597 | _; |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | modifier noGasMetering() { |
| 602 | vm.pauseGasMetering(); |
| 603 | // To prevent turning gas monitoring back on with nested functions that use this modifier, |
| 604 | // we check if gasMetering started in the off position. If it did, we don't want to turn |
| 605 | // it back on until we exit the top level function that used the modifier |
| 606 | // |
| 607 | // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well. |
| 608 | // funcA will have `gasStartedOff` as false, funcB will have it as true, |
| 609 | // so we only turn metering back on at the end of the funcA |
| 610 | bool gasStartedOff = gasMeteringOff; |
| 611 | gasMeteringOff = true; |
| 612 | |
| 613 | _; |
| 614 | |
| 615 | // if gas metering was on when this modifier was called, turn it back on at the end |
| 616 | if (!gasStartedOff) { |
| 617 | gasMeteringOff = false; |
| 618 | vm.resumeGasMetering(); |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no |
| 623 | // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We |
| 624 | // can't simply access the chain ID in a normal view or pure function because the solc View Pure |
| 625 | // Checker changed `chainid` from pure to view in 0.8.0. |
| 626 | function _viewChainId() private view returns (uint256 chainId) { |
| 627 | // Assembly required since `block.chainid` was introduced in 0.8.0. |
| 628 | assembly { |
| 629 | chainId := chainid() |
| 630 | } |
| 631 | |
| 632 | address(this); // Silence warnings in older Solc versions. |
| 633 | } |
| 634 | |
| 635 | function _pureChainId() private pure returns (uint256 chainId) { |
| 636 | function() internal view returns (uint256) fnIn = _viewChainId; |
| 637 | function() internal pure returns (uint256) pureChainId; |
| 638 | assembly { |
| 639 | pureChainId := fnIn |
| 640 | } |
| 641 | chainId = pureChainId(); |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | // Wrappers around cheatcodes to avoid footguns |
| 646 | abstract contract StdCheats is StdCheatsSafe { |
| 647 | using stdStorage for StdStorage; |
| 648 | |
| 649 | StdStorage private stdstore; |
| 650 | Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 651 | address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; |
| 652 | |
| 653 | // Skip forward or rewind time by the specified number of seconds |
| 654 | function skip(uint256 time) internal virtual { |
| 655 | vm.warp(vm.getBlockTimestamp() + time); |
| 656 | } |
| 657 | |
| 658 | function rewind(uint256 time) internal virtual { |
| 659 | vm.warp(vm.getBlockTimestamp() - time); |
| 660 | } |
| 661 | |
| 662 | // Setup a prank from an address that has some ether |
| 663 | function hoax(address msgSender) internal virtual { |
| 664 | vm.deal(msgSender, 1 << 128); |
| 665 | vm.prank(msgSender); |
| 666 | } |
| 667 | |
| 668 | function hoax(address msgSender, uint256 give) internal virtual { |
| 669 | vm.deal(msgSender, give); |
| 670 | vm.prank(msgSender); |
| 671 | } |
| 672 | |
| 673 | function hoax(address msgSender, address origin) internal virtual { |
| 674 | vm.deal(msgSender, 1 << 128); |
| 675 | vm.prank(msgSender, origin); |
| 676 | } |
| 677 | |
| 678 | function hoax(address msgSender, address origin, uint256 give) internal virtual { |
| 679 | vm.deal(msgSender, give); |
| 680 | vm.prank(msgSender, origin); |
| 681 | } |
| 682 | |
| 683 | // Start perpetual prank from an address that has some ether |
| 684 | function startHoax(address msgSender) internal virtual { |
| 685 | vm.deal(msgSender, 1 << 128); |
| 686 | vm.startPrank(msgSender); |
| 687 | } |
| 688 | |
| 689 | function startHoax(address msgSender, uint256 give) internal virtual { |
| 690 | vm.deal(msgSender, give); |
| 691 | vm.startPrank(msgSender); |
| 692 | } |
| 693 | |
| 694 | // Start perpetual prank from an address that has some ether |
| 695 | // tx.origin is set to the origin parameter |
| 696 | function startHoax(address msgSender, address origin) internal virtual { |
| 697 | vm.deal(msgSender, 1 << 128); |
| 698 | vm.startPrank(msgSender, origin); |
| 699 | } |
| 700 | |
| 701 | function startHoax(address msgSender, address origin, uint256 give) internal virtual { |
| 702 | vm.deal(msgSender, give); |
| 703 | vm.startPrank(msgSender, origin); |
| 704 | } |
| 705 | |
| 706 | function changePrank(address msgSender) internal virtual { |
| 707 | console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead."); |
| 708 | vm.stopPrank(); |
| 709 | vm.startPrank(msgSender); |
| 710 | } |
| 711 | |
| 712 | function changePrank(address msgSender, address txOrigin) internal virtual { |
| 713 | console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead."); |
| 714 | vm.stopPrank(); |
| 715 | vm.startPrank(msgSender, txOrigin); |
| 716 | } |
| 717 | |
| 718 | // The same as Vm's `deal` |
| 719 | // Use the alternative signature for ERC20 tokens |
| 720 | function deal(address to, uint256 give) internal virtual { |
| 721 | vm.deal(to, give); |
| 722 | } |
| 723 | |
| 724 | // Set the balance of an account for any ERC20 token |
| 725 | // Use the alternative signature to update `totalSupply` |
| 726 | function deal(address token, address to, uint256 give) internal virtual { |
| 727 | deal(token, to, give, false); |
| 728 | } |
| 729 | |
| 730 | // Set the balance of an account for any ERC1155 token |
| 731 | // Use the alternative signature to update `totalSupply` |
| 732 | function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual { |
| 733 | dealERC1155(token, to, id, give, false); |
| 734 | } |
| 735 | |
| 736 | function deal(address token, address to, uint256 give, bool adjust) internal virtual { |
| 737 | // get current balance |
| 738 | (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); |
| 739 | uint256 prevBal = abi.decode(balData, (uint256)); |
| 740 | |
| 741 | // update balance |
| 742 | stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); |
| 743 | |
| 744 | // update total supply |
| 745 | if (adjust) { |
| 746 | (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); |
| 747 | uint256 totSup = abi.decode(totSupData, (uint256)); |
| 748 | if (give < prevBal) { |
| 749 | totSup -= (prevBal - give); |
| 750 | } else { |
| 751 | totSup += (give - prevBal); |
| 752 | } |
| 753 | stdstore.target(token).sig(0x18160ddd).checked_write(totSup); |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual { |
| 758 | // get current balance |
| 759 | (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id)); |
| 760 | uint256 prevBal = abi.decode(balData, (uint256)); |
| 761 | |
| 762 | // update balance |
| 763 | stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give); |
| 764 | |
| 765 | // update total supply |
| 766 | if (adjust) { |
| 767 | (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id)); |
| 768 | require( |
| 769 | totSupData.length != 0, |
| 770 | "StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply." |
| 771 | ); |
| 772 | uint256 totSup = abi.decode(totSupData, (uint256)); |
| 773 | if (give < prevBal) { |
| 774 | totSup -= (prevBal - give); |
| 775 | } else { |
| 776 | totSup += (give - prevBal); |
| 777 | } |
| 778 | stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup); |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | function dealERC721(address token, address to, uint256 id) internal virtual { |
| 783 | // check if token id is already minted and the actual owner. |
| 784 | (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id)); |
| 785 | require(successMinted, "StdCheats deal(address,address,uint,bool): id not minted."); |
| 786 | |
| 787 | // get owner current balance |
| 788 | (, bytes memory fromBalData) = |
| 789 | token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address)))); |
| 790 | uint256 fromPrevBal = abi.decode(fromBalData, (uint256)); |
| 791 | |
| 792 | // get new user current balance |
| 793 | (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); |
| 794 | uint256 toPrevBal = abi.decode(toBalData, (uint256)); |
| 795 | |
| 796 | // update balances |
| 797 | stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal); |
| 798 | stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal); |
| 799 | |
| 800 | // update owner |
| 801 | stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to); |
| 802 | } |
| 803 | |
| 804 | function deployCodeTo(string memory what, address where) internal virtual { |
| 805 | deployCodeTo(what, "", 0, where); |
| 806 | } |
| 807 | |
| 808 | function deployCodeTo(string memory what, bytes memory args, address where) internal virtual { |
| 809 | deployCodeTo(what, args, 0, where); |
| 810 | } |
| 811 | |
| 812 | function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual { |
| 813 | bytes memory creationCode = vm.getCode(what); |
| 814 | vm.etch(where, abi.encodePacked(creationCode, args)); |
| 815 | (bool success, bytes memory runtimeBytecode) = where.call{value: value}(""); |
| 816 | require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); |
| 817 | vm.etch(where, runtimeBytecode); |
| 818 | } |
| 819 | |
| 820 | // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. |
| 821 | function console2_log_StdCheats(string memory p0) private view { |
| 822 | (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0)); |
| 823 | status; |
| 824 | } |
| 825 | } |
| 826 |
0.0%
lib/forge-std/src/StdConstants.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {IMulticall3} from "./interfaces/IMulticall3.sol"; |
| 5 | import {Vm} from "./Vm.sol"; |
| 6 | |
| 7 | library StdConstants { |
| 8 | /// @dev Cheat code address. |
| 9 | /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`. |
| 10 | Vm internal constant VM = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); |
| 11 | /// @dev console.sol and console2.sol work by executing a staticcall to this address. |
| 12 | /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`. |
| 13 | address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; |
| 14 | /// @dev Used when deploying with create2. |
| 15 | /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy. |
| 16 | address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; |
| 17 | /// @dev The default address for tx.origin and msg.sender. |
| 18 | /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`. |
| 19 | address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38; |
| 20 | /// @dev The address of the first contract `CREATE`d by a running test contract. |
| 21 | /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1. |
| 22 | /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`. |
| 23 | address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; |
| 24 | /// @dev Deterministic deployment address of the Multicall3 contract. |
| 25 | /// Taken from https://www.multicall3.com. |
| 26 | IMulticall3 internal constant MULTICALL3_ADDRESS = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11); |
| 27 | /// @dev The order of the secp256k1 curve. |
| 28 | uint256 internal constant SECP256K1_ORDER = |
| 29 | 115792089237316195423570985008687907852837564279074904382605163141518161494337; |
| 30 | } |
| 31 |
0.0%
lib/forge-std/src/StdError.sol
Lines covered: 0 / 10 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | // Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test |
| 3 | pragma solidity >=0.8.13 <0.9.0; |
| 4 | |
| 5 | library stdError { |
| 6 | bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01); |
| 7 | bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11); |
| 8 | bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12); |
| 9 | bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21); |
| 10 | bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22); |
| 11 | bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31); |
| 12 | bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32); |
| 13 | bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41); |
| 14 | bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51); |
| 15 | } |
| 16 |
0.0%
lib/forge-std/src/StdInvariant.sol
Lines covered: 0 / 22 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | abstract contract StdInvariant { |
| 5 | struct FuzzSelector { |
| 6 | address addr; |
| 7 | bytes4[] selectors; |
| 8 | } |
| 9 | |
| 10 | struct FuzzArtifactSelector { |
| 11 | string artifact; |
| 12 | bytes4[] selectors; |
| 13 | } |
| 14 | |
| 15 | struct FuzzInterface { |
| 16 | address addr; |
| 17 | string[] artifacts; |
| 18 | } |
| 19 | |
| 20 | address[] private _excludedContracts; |
| 21 | address[] private _excludedSenders; |
| 22 | address[] private _targetedContracts; |
| 23 | address[] private _targetedSenders; |
| 24 | |
| 25 | string[] private _excludedArtifacts; |
| 26 | string[] private _targetedArtifacts; |
| 27 | |
| 28 | FuzzArtifactSelector[] private _targetedArtifactSelectors; |
| 29 | |
| 30 | FuzzSelector[] private _excludedSelectors; |
| 31 | FuzzSelector[] private _targetedSelectors; |
| 32 | |
| 33 | FuzzInterface[] private _targetedInterfaces; |
| 34 | |
| 35 | // Functions for users: |
| 36 | // These are intended to be called in tests. |
| 37 | |
| 38 | function excludeContract(address newExcludedContract_) internal { |
| 39 | _excludedContracts.push(newExcludedContract_); |
| 40 | } |
| 41 | |
| 42 | function excludeSelector(FuzzSelector memory newExcludedSelector_) internal { |
| 43 | _excludedSelectors.push(newExcludedSelector_); |
| 44 | } |
| 45 | |
| 46 | function excludeSender(address newExcludedSender_) internal { |
| 47 | _excludedSenders.push(newExcludedSender_); |
| 48 | } |
| 49 | |
| 50 | function excludeArtifact(string memory newExcludedArtifact_) internal { |
| 51 | _excludedArtifacts.push(newExcludedArtifact_); |
| 52 | } |
| 53 | |
| 54 | function targetArtifact(string memory newTargetedArtifact_) internal { |
| 55 | _targetedArtifacts.push(newTargetedArtifact_); |
| 56 | } |
| 57 | |
| 58 | function targetArtifactSelector(FuzzArtifactSelector memory newTargetedArtifactSelector_) internal { |
| 59 | _targetedArtifactSelectors.push(newTargetedArtifactSelector_); |
| 60 | } |
| 61 | |
| 62 | function targetContract(address newTargetedContract_) internal { |
| 63 | _targetedContracts.push(newTargetedContract_); |
| 64 | } |
| 65 | |
| 66 | function targetSelector(FuzzSelector memory newTargetedSelector_) internal { |
| 67 | _targetedSelectors.push(newTargetedSelector_); |
| 68 | } |
| 69 | |
| 70 | function targetSender(address newTargetedSender_) internal { |
| 71 | _targetedSenders.push(newTargetedSender_); |
| 72 | } |
| 73 | |
| 74 | function targetInterface(FuzzInterface memory newTargetedInterface_) internal { |
| 75 | _targetedInterfaces.push(newTargetedInterface_); |
| 76 | } |
| 77 | |
| 78 | // Functions for forge: |
| 79 | // These are called by forge to run invariant tests and don't need to be called in tests. |
| 80 | |
| 81 | function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) { |
| 82 | excludedArtifacts_ = _excludedArtifacts; |
| 83 | } |
| 84 | |
| 85 | function excludeContracts() public view returns (address[] memory excludedContracts_) { |
| 86 | excludedContracts_ = _excludedContracts; |
| 87 | } |
| 88 | |
| 89 | function excludeSelectors() public view returns (FuzzSelector[] memory excludedSelectors_) { |
| 90 | excludedSelectors_ = _excludedSelectors; |
| 91 | } |
| 92 | |
| 93 | function excludeSenders() public view returns (address[] memory excludedSenders_) { |
| 94 | excludedSenders_ = _excludedSenders; |
| 95 | } |
| 96 | |
| 97 | function targetArtifacts() public view returns (string[] memory targetedArtifacts_) { |
| 98 | targetedArtifacts_ = _targetedArtifacts; |
| 99 | } |
| 100 | |
| 101 | function targetArtifactSelectors() public view returns (FuzzArtifactSelector[] memory targetedArtifactSelectors_) { |
| 102 | targetedArtifactSelectors_ = _targetedArtifactSelectors; |
| 103 | } |
| 104 | |
| 105 | function targetContracts() public view returns (address[] memory targetedContracts_) { |
| 106 | targetedContracts_ = _targetedContracts; |
| 107 | } |
| 108 | |
| 109 | function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) { |
| 110 | targetedSelectors_ = _targetedSelectors; |
| 111 | } |
| 112 | |
| 113 | function targetSenders() public view returns (address[] memory targetedSenders_) { |
| 114 | targetedSenders_ = _targetedSenders; |
| 115 | } |
| 116 | |
| 117 | function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) { |
| 118 | targetedInterfaces_ = _targetedInterfaces; |
| 119 | } |
| 120 | } |
| 121 |
0.0%
lib/forge-std/src/StdJson.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {VmSafe} from "./Vm.sol"; |
| 5 | |
| 6 | // Helpers for parsing and writing JSON files |
| 7 | // To parse: |
| 8 | // ``` |
| 9 | // using stdJson for string; |
| 10 | // string memory json = vm.readFile("<some_path>"); |
| 11 | // json.readUint("<json_path>"); |
| 12 | // ``` |
| 13 | // To write: |
| 14 | // ``` |
| 15 | // using stdJson for string; |
| 16 | // string memory json = "json"; |
| 17 | // json.serialize("a", uint256(123)); |
| 18 | // string memory semiFinal = json.serialize("b", string("test")); |
| 19 | // string memory finalJson = json.serialize("c", semiFinal); |
| 20 | // finalJson.write("<some_path>"); |
| 21 | // ``` |
| 22 | |
| 23 | library stdJson { |
| 24 | VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 25 | |
| 26 | function keyExists(string memory json, string memory key) internal view returns (bool) { |
| 27 | return vm.keyExistsJson(json, key); |
| 28 | } |
| 29 | |
| 30 | function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) { |
| 31 | return vm.parseJson(json, key); |
| 32 | } |
| 33 | |
| 34 | function readUint(string memory json, string memory key) internal pure returns (uint256) { |
| 35 | return vm.parseJsonUint(json, key); |
| 36 | } |
| 37 | |
| 38 | function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) { |
| 39 | return vm.parseJsonUintArray(json, key); |
| 40 | } |
| 41 | |
| 42 | function readInt(string memory json, string memory key) internal pure returns (int256) { |
| 43 | return vm.parseJsonInt(json, key); |
| 44 | } |
| 45 | |
| 46 | function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) { |
| 47 | return vm.parseJsonIntArray(json, key); |
| 48 | } |
| 49 | |
| 50 | function readBytes32(string memory json, string memory key) internal pure returns (bytes32) { |
| 51 | return vm.parseJsonBytes32(json, key); |
| 52 | } |
| 53 | |
| 54 | function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) { |
| 55 | return vm.parseJsonBytes32Array(json, key); |
| 56 | } |
| 57 | |
| 58 | function readString(string memory json, string memory key) internal pure returns (string memory) { |
| 59 | return vm.parseJsonString(json, key); |
| 60 | } |
| 61 | |
| 62 | function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) { |
| 63 | return vm.parseJsonStringArray(json, key); |
| 64 | } |
| 65 | |
| 66 | function readAddress(string memory json, string memory key) internal pure returns (address) { |
| 67 | return vm.parseJsonAddress(json, key); |
| 68 | } |
| 69 | |
| 70 | function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) { |
| 71 | return vm.parseJsonAddressArray(json, key); |
| 72 | } |
| 73 | |
| 74 | function readBool(string memory json, string memory key) internal pure returns (bool) { |
| 75 | return vm.parseJsonBool(json, key); |
| 76 | } |
| 77 | |
| 78 | function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) { |
| 79 | return vm.parseJsonBoolArray(json, key); |
| 80 | } |
| 81 | |
| 82 | function readBytes(string memory json, string memory key) internal pure returns (bytes memory) { |
| 83 | return vm.parseJsonBytes(json, key); |
| 84 | } |
| 85 | |
| 86 | function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) { |
| 87 | return vm.parseJsonBytesArray(json, key); |
| 88 | } |
| 89 | |
| 90 | function readUintOr(string memory json, string memory key, uint256 defaultValue) internal view returns (uint256) { |
| 91 | return keyExists(json, key) ? readUint(json, key) : defaultValue; |
| 92 | } |
| 93 | |
| 94 | function readUintArrayOr(string memory json, string memory key, uint256[] memory defaultValue) |
| 95 | internal |
| 96 | view |
| 97 | returns (uint256[] memory) |
| 98 | { |
| 99 | return keyExists(json, key) ? readUintArray(json, key) : defaultValue; |
| 100 | } |
| 101 | |
| 102 | function readIntOr(string memory json, string memory key, int256 defaultValue) internal view returns (int256) { |
| 103 | return keyExists(json, key) ? readInt(json, key) : defaultValue; |
| 104 | } |
| 105 | |
| 106 | function readIntArrayOr(string memory json, string memory key, int256[] memory defaultValue) |
| 107 | internal |
| 108 | view |
| 109 | returns (int256[] memory) |
| 110 | { |
| 111 | return keyExists(json, key) ? readIntArray(json, key) : defaultValue; |
| 112 | } |
| 113 | |
| 114 | function readBytes32Or(string memory json, string memory key, bytes32 defaultValue) |
| 115 | internal |
| 116 | view |
| 117 | returns (bytes32) |
| 118 | { |
| 119 | return keyExists(json, key) ? readBytes32(json, key) : defaultValue; |
| 120 | } |
| 121 | |
| 122 | function readBytes32ArrayOr(string memory json, string memory key, bytes32[] memory defaultValue) |
| 123 | internal |
| 124 | view |
| 125 | returns (bytes32[] memory) |
| 126 | { |
| 127 | return keyExists(json, key) ? readBytes32Array(json, key) : defaultValue; |
| 128 | } |
| 129 | |
| 130 | function readStringOr(string memory json, string memory key, string memory defaultValue) |
| 131 | internal |
| 132 | view |
| 133 | returns (string memory) |
| 134 | { |
| 135 | return keyExists(json, key) ? readString(json, key) : defaultValue; |
| 136 | } |
| 137 | |
| 138 | function readStringArrayOr(string memory json, string memory key, string[] memory defaultValue) |
| 139 | internal |
| 140 | view |
| 141 | returns (string[] memory) |
| 142 | { |
| 143 | return keyExists(json, key) ? readStringArray(json, key) : defaultValue; |
| 144 | } |
| 145 | |
| 146 | function readAddressOr(string memory json, string memory key, address defaultValue) |
| 147 | internal |
| 148 | view |
| 149 | returns (address) |
| 150 | { |
| 151 | return keyExists(json, key) ? readAddress(json, key) : defaultValue; |
| 152 | } |
| 153 | |
| 154 | function readAddressArrayOr(string memory json, string memory key, address[] memory defaultValue) |
| 155 | internal |
| 156 | view |
| 157 | returns (address[] memory) |
| 158 | { |
| 159 | return keyExists(json, key) ? readAddressArray(json, key) : defaultValue; |
| 160 | } |
| 161 | |
| 162 | function readBoolOr(string memory json, string memory key, bool defaultValue) internal view returns (bool) { |
| 163 | return keyExists(json, key) ? readBool(json, key) : defaultValue; |
| 164 | } |
| 165 | |
| 166 | function readBoolArrayOr(string memory json, string memory key, bool[] memory defaultValue) |
| 167 | internal |
| 168 | view |
| 169 | returns (bool[] memory) |
| 170 | { |
| 171 | return keyExists(json, key) ? readBoolArray(json, key) : defaultValue; |
| 172 | } |
| 173 | |
| 174 | function readBytesOr(string memory json, string memory key, bytes memory defaultValue) |
| 175 | internal |
| 176 | view |
| 177 | returns (bytes memory) |
| 178 | { |
| 179 | return keyExists(json, key) ? readBytes(json, key) : defaultValue; |
| 180 | } |
| 181 | |
| 182 | function readBytesArrayOr(string memory json, string memory key, bytes[] memory defaultValue) |
| 183 | internal |
| 184 | view |
| 185 | returns (bytes[] memory) |
| 186 | { |
| 187 | return keyExists(json, key) ? readBytesArray(json, key) : defaultValue; |
| 188 | } |
| 189 | |
| 190 | function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { |
| 191 | return vm.serializeJson(jsonKey, rootObject); |
| 192 | } |
| 193 | |
| 194 | function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { |
| 195 | return vm.serializeBool(jsonKey, key, value); |
| 196 | } |
| 197 | |
| 198 | function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) { |
| 199 | return vm.serializeBool(jsonKey, key, value); |
| 200 | } |
| 201 | |
| 202 | function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { |
| 203 | return vm.serializeUint(jsonKey, key, value); |
| 204 | } |
| 205 | |
| 206 | function serialize(string memory jsonKey, string memory key, uint256[] memory value) |
| 207 | internal |
| 208 | returns (string memory) |
| 209 | { |
| 210 | return vm.serializeUint(jsonKey, key, value); |
| 211 | } |
| 212 | |
| 213 | function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { |
| 214 | return vm.serializeInt(jsonKey, key, value); |
| 215 | } |
| 216 | |
| 217 | function serialize(string memory jsonKey, string memory key, int256[] memory value) |
| 218 | internal |
| 219 | returns (string memory) |
| 220 | { |
| 221 | return vm.serializeInt(jsonKey, key, value); |
| 222 | } |
| 223 | |
| 224 | function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { |
| 225 | return vm.serializeAddress(jsonKey, key, value); |
| 226 | } |
| 227 | |
| 228 | function serialize(string memory jsonKey, string memory key, address[] memory value) |
| 229 | internal |
| 230 | returns (string memory) |
| 231 | { |
| 232 | return vm.serializeAddress(jsonKey, key, value); |
| 233 | } |
| 234 | |
| 235 | function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { |
| 236 | return vm.serializeBytes32(jsonKey, key, value); |
| 237 | } |
| 238 | |
| 239 | function serialize(string memory jsonKey, string memory key, bytes32[] memory value) |
| 240 | internal |
| 241 | returns (string memory) |
| 242 | { |
| 243 | return vm.serializeBytes32(jsonKey, key, value); |
| 244 | } |
| 245 | |
| 246 | function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { |
| 247 | return vm.serializeBytes(jsonKey, key, value); |
| 248 | } |
| 249 | |
| 250 | function serialize(string memory jsonKey, string memory key, bytes[] memory value) |
| 251 | internal |
| 252 | returns (string memory) |
| 253 | { |
| 254 | return vm.serializeBytes(jsonKey, key, value); |
| 255 | } |
| 256 | |
| 257 | function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) { |
| 258 | return vm.serializeString(jsonKey, key, value); |
| 259 | } |
| 260 | |
| 261 | function serialize(string memory jsonKey, string memory key, string[] memory value) |
| 262 | internal |
| 263 | returns (string memory) |
| 264 | { |
| 265 | return vm.serializeString(jsonKey, key, value); |
| 266 | } |
| 267 | |
| 268 | function write(string memory jsonKey, string memory path) internal { |
| 269 | vm.writeJson(jsonKey, path); |
| 270 | } |
| 271 | |
| 272 | function write(string memory jsonKey, string memory path, string memory valueKey) internal { |
| 273 | vm.writeJson(jsonKey, path, valueKey); |
| 274 | } |
| 275 | } |
| 276 |
0.0%
lib/forge-std/src/StdMath.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | library stdMath { |
| 5 | int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968; |
| 6 | |
| 7 | function abs(int256 a) internal pure returns (uint256) { |
| 8 | // Required or it will fail when `a = type(int256).min` |
| 9 | if (a == INT256_MIN) { |
| 10 | return 57896044618658097711785492504343953926634992332820282019728792003956564819968; |
| 11 | } |
| 12 | |
| 13 | return uint256(a > 0 ? a : -a); |
| 14 | } |
| 15 | |
| 16 | function delta(uint256 a, uint256 b) internal pure returns (uint256) { |
| 17 | return a > b ? a - b : b - a; |
| 18 | } |
| 19 | |
| 20 | function delta(int256 a, int256 b) internal pure returns (uint256) { |
| 21 | // a and b are of the same sign |
| 22 | // this works thanks to two's complement, the left-most bit is the sign bit |
| 23 | if ((a ^ b) > -1) { |
| 24 | return delta(abs(a), abs(b)); |
| 25 | } |
| 26 | |
| 27 | // a and b are of opposite signs |
| 28 | return abs(a) + abs(b); |
| 29 | } |
| 30 | |
| 31 | function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) { |
| 32 | // Prevent division by zero |
| 33 | require(b != 0, "stdMath percentDelta(uint256,uint256): Divisor is zero"); |
| 34 | uint256 absDelta = delta(a, b); |
| 35 | |
| 36 | return absDelta * 1e18 / b; |
| 37 | } |
| 38 | |
| 39 | function percentDelta(int256 a, int256 b) internal pure returns (uint256) { |
| 40 | uint256 absDelta = delta(a, b); |
| 41 | uint256 absB = abs(b); |
| 42 | // Prevent division by zero |
| 43 | require(absB != 0, "stdMath percentDelta(int256,int256): Divisor is zero"); |
| 44 | |
| 45 | return absDelta * 1e18 / absB; |
| 46 | } |
| 47 | } |
| 48 |
0.0%
lib/forge-std/src/StdStorage.sol
Lines covered: 0 / 2 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {Vm} from "./Vm.sol"; |
| 5 | |
| 6 | struct FindData { |
| 7 | uint256 slot; |
| 8 | uint256 offsetLeft; |
| 9 | uint256 offsetRight; |
| 10 | bool found; |
| 11 | } |
| 12 | |
| 13 | struct StdStorage { |
| 14 | mapping(address => mapping(bytes4 => mapping(bytes32 => FindData))) finds; |
| 15 | bytes32[] _keys; |
| 16 | bytes4 _sig; |
| 17 | uint256 _depth; |
| 18 | address _target; |
| 19 | bytes32 _set; |
| 20 | bool _enable_packed_slots; |
| 21 | bytes _calldata; |
| 22 | } |
| 23 | |
| 24 | library stdStorageSafe { |
| 25 | event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot); |
| 26 | event WARNING_UninitedSlot(address who, uint256 slot); |
| 27 | |
| 28 | Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 29 | uint256 constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; |
| 30 | |
| 31 | function sigs(string memory sigStr) internal pure returns (bytes4) { |
| 32 | return bytes4(keccak256(bytes(sigStr))); |
| 33 | } |
| 34 | |
| 35 | function getCallParams(StdStorage storage self) internal view returns (bytes memory) { |
| 36 | if (self._calldata.length == 0) { |
| 37 | return flatten(self._keys); |
| 38 | } else { |
| 39 | return self._calldata; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // Calls target contract with configured parameters |
| 44 | function callTarget(StdStorage storage self) internal view returns (bool, bytes32) { |
| 45 | bytes memory cd = abi.encodePacked(self._sig, getCallParams(self)); |
| 46 | (bool success, bytes memory rdat) = self._target.staticcall(cd); |
| 47 | bytes32 result = bytesToBytes32(rdat, 32 * self._depth); |
| 48 | |
| 49 | return (success, result); |
| 50 | } |
| 51 | |
| 52 | // Tries mutating slot value to determine if the targeted value is stored in it. |
| 53 | // If current value is 0, then we are setting slot value to type(uint256).max |
| 54 | // Otherwise, we set it to 0. That way, return value should always be affected. |
| 55 | function checkSlotMutatesCall(StdStorage storage self, bytes32 slot) internal returns (bool) { |
| 56 | bytes32 prevSlotValue = vm.load(self._target, slot); |
| 57 | (bool success, bytes32 prevReturnValue) = callTarget(self); |
| 58 | |
| 59 | bytes32 testVal = prevReturnValue == bytes32(0) ? bytes32(UINT256_MAX) : bytes32(0); |
| 60 | vm.store(self._target, slot, testVal); |
| 61 | |
| 62 | (, bytes32 newReturnValue) = callTarget(self); |
| 63 | |
| 64 | vm.store(self._target, slot, prevSlotValue); |
| 65 | |
| 66 | return (success && (prevReturnValue != newReturnValue)); |
| 67 | } |
| 68 | |
| 69 | // Tries setting one of the bits in slot to 1 until return value changes. |
| 70 | // Index of resulted bit is an offset packed slot has from left/right side |
| 71 | function findOffset(StdStorage storage self, bytes32 slot, bool left) internal returns (bool, uint256) { |
| 72 | for (uint256 offset = 0; offset < 256; offset++) { |
| 73 | uint256 valueToPut = left ? (1 << (255 - offset)) : (1 << offset); |
| 74 | vm.store(self._target, slot, bytes32(valueToPut)); |
| 75 | |
| 76 | (bool success, bytes32 data) = callTarget(self); |
| 77 | |
| 78 | if (success && (uint256(data) > 0)) { |
| 79 | return (true, offset); |
| 80 | } |
| 81 | } |
| 82 | return (false, 0); |
| 83 | } |
| 84 | |
| 85 | function findOffsets(StdStorage storage self, bytes32 slot) internal returns (bool, uint256, uint256) { |
| 86 | bytes32 prevSlotValue = vm.load(self._target, slot); |
| 87 | |
| 88 | (bool foundLeft, uint256 offsetLeft) = findOffset(self, slot, true); |
| 89 | (bool foundRight, uint256 offsetRight) = findOffset(self, slot, false); |
| 90 | |
| 91 | // `findOffset` may mutate slot value, so we are setting it to initial value |
| 92 | vm.store(self._target, slot, prevSlotValue); |
| 93 | return (foundLeft && foundRight, offsetLeft, offsetRight); |
| 94 | } |
| 95 | |
| 96 | function find(StdStorage storage self) internal returns (FindData storage) { |
| 97 | return find(self, true); |
| 98 | } |
| 99 | |
| 100 | /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against |
| 101 | // slot complexity: |
| 102 | // if flat, will be bytes32(uint256(uint)); |
| 103 | // if map, will be keccak256(abi.encode(key, uint(slot))); |
| 104 | // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot))))); |
| 105 | // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth); |
| 106 | function find(StdStorage storage self, bool _clear) internal returns (FindData storage) { |
| 107 | address who = self._target; |
| 108 | bytes4 fsig = self._sig; |
| 109 | uint256 field_depth = self._depth; |
| 110 | bytes memory params = getCallParams(self); |
| 111 | |
| 112 | // calldata to test against |
| 113 | if (self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { |
| 114 | if (_clear) { |
| 115 | clear(self); |
| 116 | } |
| 117 | return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
| 118 | } |
| 119 | vm.record(); |
| 120 | (, bytes32 callResult) = callTarget(self); |
| 121 | (bytes32[] memory reads,) = vm.accesses(address(who)); |
| 122 | |
| 123 | if (reads.length == 0) { |
| 124 | revert("stdStorage find(StdStorage): No storage use detected for target."); |
| 125 | } else { |
| 126 | for (uint256 i = reads.length; --i >= 0;) { |
| 127 | bytes32 prev = vm.load(who, reads[i]); |
| 128 | if (prev == bytes32(0)) { |
| 129 | emit WARNING_UninitedSlot(who, uint256(reads[i])); |
| 130 | } |
| 131 | |
| 132 | if (!checkSlotMutatesCall(self, reads[i])) { |
| 133 | continue; |
| 134 | } |
| 135 | |
| 136 | (uint256 offsetLeft, uint256 offsetRight) = (0, 0); |
| 137 | |
| 138 | if (self._enable_packed_slots) { |
| 139 | bool found; |
| 140 | (found, offsetLeft, offsetRight) = findOffsets(self, reads[i]); |
| 141 | if (!found) { |
| 142 | continue; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | // Check that value between found offsets is equal to the current call result |
| 147 | uint256 curVal = (uint256(prev) & getMaskByOffsets(offsetLeft, offsetRight)) >> offsetRight; |
| 148 | |
| 149 | if (uint256(callResult) != curVal) { |
| 150 | continue; |
| 151 | } |
| 152 | |
| 153 | emit SlotFound(who, fsig, keccak256(abi.encodePacked(params, field_depth)), uint256(reads[i])); |
| 154 | self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))] = |
| 155 | FindData(uint256(reads[i]), offsetLeft, offsetRight, true); |
| 156 | break; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | require( |
| 161 | self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found, |
| 162 | "stdStorage find(StdStorage): Slot(s) not found." |
| 163 | ); |
| 164 | |
| 165 | if (_clear) { |
| 166 | clear(self); |
| 167 | } |
| 168 | return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
| 169 | } |
| 170 | |
| 171 | function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { |
| 172 | self._target = _target; |
| 173 | return self; |
| 174 | } |
| 175 | |
| 176 | function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { |
| 177 | self._sig = _sig; |
| 178 | return self; |
| 179 | } |
| 180 | |
| 181 | function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { |
| 182 | self._sig = sigs(_sig); |
| 183 | return self; |
| 184 | } |
| 185 | |
| 186 | function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { |
| 187 | self._calldata = _calldata; |
| 188 | return self; |
| 189 | } |
| 190 | |
| 191 | function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { |
| 192 | self._keys.push(bytes32(uint256(uint160(who)))); |
| 193 | return self; |
| 194 | } |
| 195 | |
| 196 | function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { |
| 197 | self._keys.push(bytes32(amt)); |
| 198 | return self; |
| 199 | } |
| 200 | |
| 201 | function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { |
| 202 | self._keys.push(key); |
| 203 | return self; |
| 204 | } |
| 205 | |
| 206 | function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { |
| 207 | self._enable_packed_slots = true; |
| 208 | return self; |
| 209 | } |
| 210 | |
| 211 | function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { |
| 212 | self._depth = _depth; |
| 213 | return self; |
| 214 | } |
| 215 | |
| 216 | function read(StdStorage storage self) private returns (bytes memory) { |
| 217 | FindData storage data = find(self, false); |
| 218 | uint256 mask = getMaskByOffsets(data.offsetLeft, data.offsetRight); |
| 219 | uint256 value = (uint256(vm.load(self._target, bytes32(data.slot))) & mask) >> data.offsetRight; |
| 220 | clear(self); |
| 221 | return abi.encode(value); |
| 222 | } |
| 223 | |
| 224 | function read_bytes32(StdStorage storage self) internal returns (bytes32) { |
| 225 | return abi.decode(read(self), (bytes32)); |
| 226 | } |
| 227 | |
| 228 | function read_bool(StdStorage storage self) internal returns (bool) { |
| 229 | int256 v = read_int(self); |
| 230 | if (v == 0) return false; |
| 231 | if (v == 1) return true; |
| 232 | revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); |
| 233 | } |
| 234 | |
| 235 | function read_address(StdStorage storage self) internal returns (address) { |
| 236 | return abi.decode(read(self), (address)); |
| 237 | } |
| 238 | |
| 239 | function read_uint(StdStorage storage self) internal returns (uint256) { |
| 240 | return abi.decode(read(self), (uint256)); |
| 241 | } |
| 242 | |
| 243 | function read_int(StdStorage storage self) internal returns (int256) { |
| 244 | return abi.decode(read(self), (int256)); |
| 245 | } |
| 246 | |
| 247 | function parent(StdStorage storage self) internal returns (uint256, bytes32) { |
| 248 | address who = self._target; |
| 249 | uint256 field_depth = self._depth; |
| 250 | vm.startMappingRecording(); |
| 251 | uint256 child = find(self, true).slot - field_depth; |
| 252 | (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); |
| 253 | if (!found) { |
| 254 | revert( |
| 255 | "stdStorage parent(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." |
| 256 | ); |
| 257 | } |
| 258 | return (uint256(parent_slot), key); |
| 259 | } |
| 260 | |
| 261 | function root(StdStorage storage self) internal returns (uint256) { |
| 262 | address who = self._target; |
| 263 | uint256 field_depth = self._depth; |
| 264 | vm.startMappingRecording(); |
| 265 | uint256 child = find(self, true).slot - field_depth; |
| 266 | bool found; |
| 267 | bytes32 root_slot; |
| 268 | bytes32 parent_slot; |
| 269 | (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); |
| 270 | if (!found) { |
| 271 | revert( |
| 272 | "stdStorage root(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." |
| 273 | ); |
| 274 | } |
| 275 | while (found) { |
| 276 | root_slot = parent_slot; |
| 277 | (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot)); |
| 278 | } |
| 279 | return uint256(root_slot); |
| 280 | } |
| 281 | |
| 282 | function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) { |
| 283 | bytes32 out; |
| 284 | |
| 285 | // Cap read length by remaining bytes from `offset`, and at most 32 bytes to avoid out-of-bounds |
| 286 | uint256 max = b.length > offset ? b.length - offset : 0; |
| 287 | if (max > 32) { |
| 288 | max = 32; |
| 289 | } |
| 290 | for (uint256 i = 0; i < max; i++) { |
| 291 | out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); |
| 292 | } |
| 293 | return out; |
| 294 | } |
| 295 | |
| 296 | function flatten(bytes32[] memory b) private pure returns (bytes memory) { |
| 297 | bytes memory result = new bytes(b.length * 32); |
| 298 | for (uint256 i = 0; i < b.length; i++) { |
| 299 | bytes32 k = b[i]; |
| 300 | assembly ("memory-safe") { |
| 301 | mstore(add(result, add(32, mul(32, i))), k) |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | return result; |
| 306 | } |
| 307 | |
| 308 | function clear(StdStorage storage self) internal { |
| 309 | delete self._target; |
| 310 | delete self._sig; |
| 311 | delete self._keys; |
| 312 | delete self._depth; |
| 313 | delete self._enable_packed_slots; |
| 314 | delete self._calldata; |
| 315 | } |
| 316 | |
| 317 | // Returns mask which contains non-zero bits for values between `offsetLeft` and `offsetRight` |
| 318 | // (slotValue & mask) >> offsetRight will be the value of the given packed variable |
| 319 | function getMaskByOffsets(uint256 offsetLeft, uint256 offsetRight) internal pure returns (uint256 mask) { |
| 320 | // mask = ((1 << (256 - (offsetRight + offsetLeft))) - 1) << offsetRight; |
| 321 | // using assembly because (1 << 256) causes overflow |
| 322 | assembly { |
| 323 | mask := shl(offsetRight, sub(shl(sub(256, add(offsetRight, offsetLeft)), 1), 1)) |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | // Returns slot value with updated packed variable. |
| 328 | function getUpdatedSlotValue(bytes32 curValue, uint256 varValue, uint256 offsetLeft, uint256 offsetRight) |
| 329 | internal |
| 330 | pure |
| 331 | returns (bytes32 newValue) |
| 332 | { |
| 333 | return bytes32((uint256(curValue) & ~getMaskByOffsets(offsetLeft, offsetRight)) | (varValue << offsetRight)); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | library stdStorage { |
| 338 | Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 339 | |
| 340 | function sigs(string memory sigStr) internal pure returns (bytes4) { |
| 341 | return stdStorageSafe.sigs(sigStr); |
| 342 | } |
| 343 | |
| 344 | function find(StdStorage storage self) internal returns (uint256) { |
| 345 | return find(self, true); |
| 346 | } |
| 347 | |
| 348 | function find(StdStorage storage self, bool _clear) internal returns (uint256) { |
| 349 | return stdStorageSafe.find(self, _clear).slot; |
| 350 | } |
| 351 | |
| 352 | function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { |
| 353 | return stdStorageSafe.target(self, _target); |
| 354 | } |
| 355 | |
| 356 | function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { |
| 357 | return stdStorageSafe.sig(self, _sig); |
| 358 | } |
| 359 | |
| 360 | function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { |
| 361 | return stdStorageSafe.sig(self, _sig); |
| 362 | } |
| 363 | |
| 364 | function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { |
| 365 | return stdStorageSafe.with_key(self, who); |
| 366 | } |
| 367 | |
| 368 | function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { |
| 369 | return stdStorageSafe.with_key(self, amt); |
| 370 | } |
| 371 | |
| 372 | function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { |
| 373 | return stdStorageSafe.with_key(self, key); |
| 374 | } |
| 375 | |
| 376 | function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { |
| 377 | return stdStorageSafe.with_calldata(self, _calldata); |
| 378 | } |
| 379 | |
| 380 | function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { |
| 381 | return stdStorageSafe.enable_packed_slots(self); |
| 382 | } |
| 383 | |
| 384 | function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { |
| 385 | return stdStorageSafe.depth(self, _depth); |
| 386 | } |
| 387 | |
| 388 | function clear(StdStorage storage self) internal { |
| 389 | stdStorageSafe.clear(self); |
| 390 | } |
| 391 | |
| 392 | function checked_write(StdStorage storage self, address who) internal { |
| 393 | checked_write(self, bytes32(uint256(uint160(who)))); |
| 394 | } |
| 395 | |
| 396 | function checked_write(StdStorage storage self, uint256 amt) internal { |
| 397 | checked_write(self, bytes32(amt)); |
| 398 | } |
| 399 | |
| 400 | function checked_write_int(StdStorage storage self, int256 val) internal { |
| 401 | checked_write(self, bytes32(uint256(val))); |
| 402 | } |
| 403 | |
| 404 | function checked_write(StdStorage storage self, bool write) internal { |
| 405 | bytes32 t; |
| 406 | assembly ("memory-safe") { |
| 407 | t := write |
| 408 | } |
| 409 | checked_write(self, t); |
| 410 | } |
| 411 | |
| 412 | function checked_write(StdStorage storage self, bytes32 set) internal { |
| 413 | address who = self._target; |
| 414 | bytes4 fsig = self._sig; |
| 415 | uint256 field_depth = self._depth; |
| 416 | bytes memory params = stdStorageSafe.getCallParams(self); |
| 417 | |
| 418 | if (!self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { |
| 419 | find(self, false); |
| 420 | } |
| 421 | FindData storage data = self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; |
| 422 | if ((data.offsetLeft + data.offsetRight) > 0) { |
| 423 | uint256 maxVal = 2 ** (256 - (data.offsetLeft + data.offsetRight)); |
| 424 | require( |
| 425 | uint256(set) < maxVal, |
| 426 | string( |
| 427 | abi.encodePacked( |
| 428 | "stdStorage find(StdStorage): Packed slot. We can't fit value greater than ", |
| 429 | vm.toString(maxVal) |
| 430 | ) |
| 431 | ) |
| 432 | ); |
| 433 | } |
| 434 | bytes32 curVal = vm.load(who, bytes32(data.slot)); |
| 435 | bytes32 valToSet = stdStorageSafe.getUpdatedSlotValue(curVal, uint256(set), data.offsetLeft, data.offsetRight); |
| 436 | |
| 437 | vm.store(who, bytes32(data.slot), valToSet); |
| 438 | |
| 439 | (bool success, bytes32 callResult) = stdStorageSafe.callTarget(self); |
| 440 | |
| 441 | if (!success || callResult != set) { |
| 442 | vm.store(who, bytes32(data.slot), curVal); |
| 443 | revert("stdStorage find(StdStorage): Failed to write value."); |
| 444 | } |
| 445 | clear(self); |
| 446 | } |
| 447 | |
| 448 | function read_bytes32(StdStorage storage self) internal returns (bytes32) { |
| 449 | return stdStorageSafe.read_bytes32(self); |
| 450 | } |
| 451 | |
| 452 | function read_bool(StdStorage storage self) internal returns (bool) { |
| 453 | return stdStorageSafe.read_bool(self); |
| 454 | } |
| 455 | |
| 456 | function read_address(StdStorage storage self) internal returns (address) { |
| 457 | return stdStorageSafe.read_address(self); |
| 458 | } |
| 459 | |
| 460 | function read_uint(StdStorage storage self) internal returns (uint256) { |
| 461 | return stdStorageSafe.read_uint(self); |
| 462 | } |
| 463 | |
| 464 | function read_int(StdStorage storage self) internal returns (int256) { |
| 465 | return stdStorageSafe.read_int(self); |
| 466 | } |
| 467 | |
| 468 | function parent(StdStorage storage self) internal returns (uint256, bytes32) { |
| 469 | return stdStorageSafe.parent(self); |
| 470 | } |
| 471 | |
| 472 | function root(StdStorage storage self) internal returns (uint256) { |
| 473 | return stdStorageSafe.root(self); |
| 474 | } |
| 475 | } |
| 476 |
0.0%
lib/forge-std/src/StdStyle.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {VmSafe} from "./Vm.sol"; |
| 5 | |
| 6 | library StdStyle { |
| 7 | VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 8 | |
| 9 | string constant RED = "\u001b[91m"; |
| 10 | string constant GREEN = "\u001b[92m"; |
| 11 | string constant YELLOW = "\u001b[93m"; |
| 12 | string constant BLUE = "\u001b[94m"; |
| 13 | string constant MAGENTA = "\u001b[95m"; |
| 14 | string constant CYAN = "\u001b[96m"; |
| 15 | string constant BOLD = "\u001b[1m"; |
| 16 | string constant DIM = "\u001b[2m"; |
| 17 | string constant ITALIC = "\u001b[3m"; |
| 18 | string constant UNDERLINE = "\u001b[4m"; |
| 19 | string constant INVERSE = "\u001b[7m"; |
| 20 | string constant RESET = "\u001b[0m"; |
| 21 | |
| 22 | function styleConcat(string memory style, string memory self) private pure returns (string memory) { |
| 23 | return string(abi.encodePacked(style, self, RESET)); |
| 24 | } |
| 25 | |
| 26 | function red(string memory self) internal pure returns (string memory) { |
| 27 | return styleConcat(RED, self); |
| 28 | } |
| 29 | |
| 30 | function red(uint256 self) internal pure returns (string memory) { |
| 31 | return red(vm.toString(self)); |
| 32 | } |
| 33 | |
| 34 | function red(int256 self) internal pure returns (string memory) { |
| 35 | return red(vm.toString(self)); |
| 36 | } |
| 37 | |
| 38 | function red(address self) internal pure returns (string memory) { |
| 39 | return red(vm.toString(self)); |
| 40 | } |
| 41 | |
| 42 | function red(bool self) internal pure returns (string memory) { |
| 43 | return red(vm.toString(self)); |
| 44 | } |
| 45 | |
| 46 | function redBytes(bytes memory self) internal pure returns (string memory) { |
| 47 | return red(vm.toString(self)); |
| 48 | } |
| 49 | |
| 50 | function redBytes32(bytes32 self) internal pure returns (string memory) { |
| 51 | return red(vm.toString(self)); |
| 52 | } |
| 53 | |
| 54 | function green(string memory self) internal pure returns (string memory) { |
| 55 | return styleConcat(GREEN, self); |
| 56 | } |
| 57 | |
| 58 | function green(uint256 self) internal pure returns (string memory) { |
| 59 | return green(vm.toString(self)); |
| 60 | } |
| 61 | |
| 62 | function green(int256 self) internal pure returns (string memory) { |
| 63 | return green(vm.toString(self)); |
| 64 | } |
| 65 | |
| 66 | function green(address self) internal pure returns (string memory) { |
| 67 | return green(vm.toString(self)); |
| 68 | } |
| 69 | |
| 70 | function green(bool self) internal pure returns (string memory) { |
| 71 | return green(vm.toString(self)); |
| 72 | } |
| 73 | |
| 74 | function greenBytes(bytes memory self) internal pure returns (string memory) { |
| 75 | return green(vm.toString(self)); |
| 76 | } |
| 77 | |
| 78 | function greenBytes32(bytes32 self) internal pure returns (string memory) { |
| 79 | return green(vm.toString(self)); |
| 80 | } |
| 81 | |
| 82 | function yellow(string memory self) internal pure returns (string memory) { |
| 83 | return styleConcat(YELLOW, self); |
| 84 | } |
| 85 | |
| 86 | function yellow(uint256 self) internal pure returns (string memory) { |
| 87 | return yellow(vm.toString(self)); |
| 88 | } |
| 89 | |
| 90 | function yellow(int256 self) internal pure returns (string memory) { |
| 91 | return yellow(vm.toString(self)); |
| 92 | } |
| 93 | |
| 94 | function yellow(address self) internal pure returns (string memory) { |
| 95 | return yellow(vm.toString(self)); |
| 96 | } |
| 97 | |
| 98 | function yellow(bool self) internal pure returns (string memory) { |
| 99 | return yellow(vm.toString(self)); |
| 100 | } |
| 101 | |
| 102 | function yellowBytes(bytes memory self) internal pure returns (string memory) { |
| 103 | return yellow(vm.toString(self)); |
| 104 | } |
| 105 | |
| 106 | function yellowBytes32(bytes32 self) internal pure returns (string memory) { |
| 107 | return yellow(vm.toString(self)); |
| 108 | } |
| 109 | |
| 110 | function blue(string memory self) internal pure returns (string memory) { |
| 111 | return styleConcat(BLUE, self); |
| 112 | } |
| 113 | |
| 114 | function blue(uint256 self) internal pure returns (string memory) { |
| 115 | return blue(vm.toString(self)); |
| 116 | } |
| 117 | |
| 118 | function blue(int256 self) internal pure returns (string memory) { |
| 119 | return blue(vm.toString(self)); |
| 120 | } |
| 121 | |
| 122 | function blue(address self) internal pure returns (string memory) { |
| 123 | return blue(vm.toString(self)); |
| 124 | } |
| 125 | |
| 126 | function blue(bool self) internal pure returns (string memory) { |
| 127 | return blue(vm.toString(self)); |
| 128 | } |
| 129 | |
| 130 | function blueBytes(bytes memory self) internal pure returns (string memory) { |
| 131 | return blue(vm.toString(self)); |
| 132 | } |
| 133 | |
| 134 | function blueBytes32(bytes32 self) internal pure returns (string memory) { |
| 135 | return blue(vm.toString(self)); |
| 136 | } |
| 137 | |
| 138 | function magenta(string memory self) internal pure returns (string memory) { |
| 139 | return styleConcat(MAGENTA, self); |
| 140 | } |
| 141 | |
| 142 | function magenta(uint256 self) internal pure returns (string memory) { |
| 143 | return magenta(vm.toString(self)); |
| 144 | } |
| 145 | |
| 146 | function magenta(int256 self) internal pure returns (string memory) { |
| 147 | return magenta(vm.toString(self)); |
| 148 | } |
| 149 | |
| 150 | function magenta(address self) internal pure returns (string memory) { |
| 151 | return magenta(vm.toString(self)); |
| 152 | } |
| 153 | |
| 154 | function magenta(bool self) internal pure returns (string memory) { |
| 155 | return magenta(vm.toString(self)); |
| 156 | } |
| 157 | |
| 158 | function magentaBytes(bytes memory self) internal pure returns (string memory) { |
| 159 | return magenta(vm.toString(self)); |
| 160 | } |
| 161 | |
| 162 | function magentaBytes32(bytes32 self) internal pure returns (string memory) { |
| 163 | return magenta(vm.toString(self)); |
| 164 | } |
| 165 | |
| 166 | function cyan(string memory self) internal pure returns (string memory) { |
| 167 | return styleConcat(CYAN, self); |
| 168 | } |
| 169 | |
| 170 | function cyan(uint256 self) internal pure returns (string memory) { |
| 171 | return cyan(vm.toString(self)); |
| 172 | } |
| 173 | |
| 174 | function cyan(int256 self) internal pure returns (string memory) { |
| 175 | return cyan(vm.toString(self)); |
| 176 | } |
| 177 | |
| 178 | function cyan(address self) internal pure returns (string memory) { |
| 179 | return cyan(vm.toString(self)); |
| 180 | } |
| 181 | |
| 182 | function cyan(bool self) internal pure returns (string memory) { |
| 183 | return cyan(vm.toString(self)); |
| 184 | } |
| 185 | |
| 186 | function cyanBytes(bytes memory self) internal pure returns (string memory) { |
| 187 | return cyan(vm.toString(self)); |
| 188 | } |
| 189 | |
| 190 | function cyanBytes32(bytes32 self) internal pure returns (string memory) { |
| 191 | return cyan(vm.toString(self)); |
| 192 | } |
| 193 | |
| 194 | function bold(string memory self) internal pure returns (string memory) { |
| 195 | return styleConcat(BOLD, self); |
| 196 | } |
| 197 | |
| 198 | function bold(uint256 self) internal pure returns (string memory) { |
| 199 | return bold(vm.toString(self)); |
| 200 | } |
| 201 | |
| 202 | function bold(int256 self) internal pure returns (string memory) { |
| 203 | return bold(vm.toString(self)); |
| 204 | } |
| 205 | |
| 206 | function bold(address self) internal pure returns (string memory) { |
| 207 | return bold(vm.toString(self)); |
| 208 | } |
| 209 | |
| 210 | function bold(bool self) internal pure returns (string memory) { |
| 211 | return bold(vm.toString(self)); |
| 212 | } |
| 213 | |
| 214 | function boldBytes(bytes memory self) internal pure returns (string memory) { |
| 215 | return bold(vm.toString(self)); |
| 216 | } |
| 217 | |
| 218 | function boldBytes32(bytes32 self) internal pure returns (string memory) { |
| 219 | return bold(vm.toString(self)); |
| 220 | } |
| 221 | |
| 222 | function dim(string memory self) internal pure returns (string memory) { |
| 223 | return styleConcat(DIM, self); |
| 224 | } |
| 225 | |
| 226 | function dim(uint256 self) internal pure returns (string memory) { |
| 227 | return dim(vm.toString(self)); |
| 228 | } |
| 229 | |
| 230 | function dim(int256 self) internal pure returns (string memory) { |
| 231 | return dim(vm.toString(self)); |
| 232 | } |
| 233 | |
| 234 | function dim(address self) internal pure returns (string memory) { |
| 235 | return dim(vm.toString(self)); |
| 236 | } |
| 237 | |
| 238 | function dim(bool self) internal pure returns (string memory) { |
| 239 | return dim(vm.toString(self)); |
| 240 | } |
| 241 | |
| 242 | function dimBytes(bytes memory self) internal pure returns (string memory) { |
| 243 | return dim(vm.toString(self)); |
| 244 | } |
| 245 | |
| 246 | function dimBytes32(bytes32 self) internal pure returns (string memory) { |
| 247 | return dim(vm.toString(self)); |
| 248 | } |
| 249 | |
| 250 | function italic(string memory self) internal pure returns (string memory) { |
| 251 | return styleConcat(ITALIC, self); |
| 252 | } |
| 253 | |
| 254 | function italic(uint256 self) internal pure returns (string memory) { |
| 255 | return italic(vm.toString(self)); |
| 256 | } |
| 257 | |
| 258 | function italic(int256 self) internal pure returns (string memory) { |
| 259 | return italic(vm.toString(self)); |
| 260 | } |
| 261 | |
| 262 | function italic(address self) internal pure returns (string memory) { |
| 263 | return italic(vm.toString(self)); |
| 264 | } |
| 265 | |
| 266 | function italic(bool self) internal pure returns (string memory) { |
| 267 | return italic(vm.toString(self)); |
| 268 | } |
| 269 | |
| 270 | function italicBytes(bytes memory self) internal pure returns (string memory) { |
| 271 | return italic(vm.toString(self)); |
| 272 | } |
| 273 | |
| 274 | function italicBytes32(bytes32 self) internal pure returns (string memory) { |
| 275 | return italic(vm.toString(self)); |
| 276 | } |
| 277 | |
| 278 | function underline(string memory self) internal pure returns (string memory) { |
| 279 | return styleConcat(UNDERLINE, self); |
| 280 | } |
| 281 | |
| 282 | function underline(uint256 self) internal pure returns (string memory) { |
| 283 | return underline(vm.toString(self)); |
| 284 | } |
| 285 | |
| 286 | function underline(int256 self) internal pure returns (string memory) { |
| 287 | return underline(vm.toString(self)); |
| 288 | } |
| 289 | |
| 290 | function underline(address self) internal pure returns (string memory) { |
| 291 | return underline(vm.toString(self)); |
| 292 | } |
| 293 | |
| 294 | function underline(bool self) internal pure returns (string memory) { |
| 295 | return underline(vm.toString(self)); |
| 296 | } |
| 297 | |
| 298 | function underlineBytes(bytes memory self) internal pure returns (string memory) { |
| 299 | return underline(vm.toString(self)); |
| 300 | } |
| 301 | |
| 302 | function underlineBytes32(bytes32 self) internal pure returns (string memory) { |
| 303 | return underline(vm.toString(self)); |
| 304 | } |
| 305 | |
| 306 | function inverse(string memory self) internal pure returns (string memory) { |
| 307 | return styleConcat(INVERSE, self); |
| 308 | } |
| 309 | |
| 310 | function inverse(uint256 self) internal pure returns (string memory) { |
| 311 | return inverse(vm.toString(self)); |
| 312 | } |
| 313 | |
| 314 | function inverse(int256 self) internal pure returns (string memory) { |
| 315 | return inverse(vm.toString(self)); |
| 316 | } |
| 317 | |
| 318 | function inverse(address self) internal pure returns (string memory) { |
| 319 | return inverse(vm.toString(self)); |
| 320 | } |
| 321 | |
| 322 | function inverse(bool self) internal pure returns (string memory) { |
| 323 | return inverse(vm.toString(self)); |
| 324 | } |
| 325 | |
| 326 | function inverseBytes(bytes memory self) internal pure returns (string memory) { |
| 327 | return inverse(vm.toString(self)); |
| 328 | } |
| 329 | |
| 330 | function inverseBytes32(bytes32 self) internal pure returns (string memory) { |
| 331 | return inverse(vm.toString(self)); |
| 332 | } |
| 333 | } |
| 334 |
0.0%
lib/forge-std/src/StdToml.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {VmSafe} from "./Vm.sol"; |
| 5 | |
| 6 | // Helpers for parsing and writing TOML files |
| 7 | // To parse: |
| 8 | // ``` |
| 9 | // using stdToml for string; |
| 10 | // string memory toml = vm.readFile("<some_path>"); |
| 11 | // toml.readUint("<json_path>"); |
| 12 | // ``` |
| 13 | // To write: |
| 14 | // ``` |
| 15 | // using stdToml for string; |
| 16 | // string memory json = "json"; |
| 17 | // json.serialize("a", uint256(123)); |
| 18 | // string memory semiFinal = json.serialize("b", string("test")); |
| 19 | // string memory finalJson = json.serialize("c", semiFinal); |
| 20 | // finalJson.write("<some_path>"); |
| 21 | // ``` |
| 22 | |
| 23 | library stdToml { |
| 24 | VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 25 | |
| 26 | function keyExists(string memory toml, string memory key) internal view returns (bool) { |
| 27 | return vm.keyExistsToml(toml, key); |
| 28 | } |
| 29 | |
| 30 | function parseRaw(string memory toml, string memory key) internal pure returns (bytes memory) { |
| 31 | return vm.parseToml(toml, key); |
| 32 | } |
| 33 | |
| 34 | function readUint(string memory toml, string memory key) internal pure returns (uint256) { |
| 35 | return vm.parseTomlUint(toml, key); |
| 36 | } |
| 37 | |
| 38 | function readUintArray(string memory toml, string memory key) internal pure returns (uint256[] memory) { |
| 39 | return vm.parseTomlUintArray(toml, key); |
| 40 | } |
| 41 | |
| 42 | function readInt(string memory toml, string memory key) internal pure returns (int256) { |
| 43 | return vm.parseTomlInt(toml, key); |
| 44 | } |
| 45 | |
| 46 | function readIntArray(string memory toml, string memory key) internal pure returns (int256[] memory) { |
| 47 | return vm.parseTomlIntArray(toml, key); |
| 48 | } |
| 49 | |
| 50 | function readBytes32(string memory toml, string memory key) internal pure returns (bytes32) { |
| 51 | return vm.parseTomlBytes32(toml, key); |
| 52 | } |
| 53 | |
| 54 | function readBytes32Array(string memory toml, string memory key) internal pure returns (bytes32[] memory) { |
| 55 | return vm.parseTomlBytes32Array(toml, key); |
| 56 | } |
| 57 | |
| 58 | function readString(string memory toml, string memory key) internal pure returns (string memory) { |
| 59 | return vm.parseTomlString(toml, key); |
| 60 | } |
| 61 | |
| 62 | function readStringArray(string memory toml, string memory key) internal pure returns (string[] memory) { |
| 63 | return vm.parseTomlStringArray(toml, key); |
| 64 | } |
| 65 | |
| 66 | function readAddress(string memory toml, string memory key) internal pure returns (address) { |
| 67 | return vm.parseTomlAddress(toml, key); |
| 68 | } |
| 69 | |
| 70 | function readAddressArray(string memory toml, string memory key) internal pure returns (address[] memory) { |
| 71 | return vm.parseTomlAddressArray(toml, key); |
| 72 | } |
| 73 | |
| 74 | function readBool(string memory toml, string memory key) internal pure returns (bool) { |
| 75 | return vm.parseTomlBool(toml, key); |
| 76 | } |
| 77 | |
| 78 | function readBoolArray(string memory toml, string memory key) internal pure returns (bool[] memory) { |
| 79 | return vm.parseTomlBoolArray(toml, key); |
| 80 | } |
| 81 | |
| 82 | function readBytes(string memory toml, string memory key) internal pure returns (bytes memory) { |
| 83 | return vm.parseTomlBytes(toml, key); |
| 84 | } |
| 85 | |
| 86 | function readBytesArray(string memory toml, string memory key) internal pure returns (bytes[] memory) { |
| 87 | return vm.parseTomlBytesArray(toml, key); |
| 88 | } |
| 89 | |
| 90 | function readUintOr(string memory toml, string memory key, uint256 defaultValue) internal view returns (uint256) { |
| 91 | return keyExists(toml, key) ? readUint(toml, key) : defaultValue; |
| 92 | } |
| 93 | |
| 94 | function readUintArrayOr(string memory toml, string memory key, uint256[] memory defaultValue) |
| 95 | internal |
| 96 | view |
| 97 | returns (uint256[] memory) |
| 98 | { |
| 99 | return keyExists(toml, key) ? readUintArray(toml, key) : defaultValue; |
| 100 | } |
| 101 | |
| 102 | function readIntOr(string memory toml, string memory key, int256 defaultValue) internal view returns (int256) { |
| 103 | return keyExists(toml, key) ? readInt(toml, key) : defaultValue; |
| 104 | } |
| 105 | |
| 106 | function readIntArrayOr(string memory toml, string memory key, int256[] memory defaultValue) |
| 107 | internal |
| 108 | view |
| 109 | returns (int256[] memory) |
| 110 | { |
| 111 | return keyExists(toml, key) ? readIntArray(toml, key) : defaultValue; |
| 112 | } |
| 113 | |
| 114 | function readBytes32Or(string memory toml, string memory key, bytes32 defaultValue) |
| 115 | internal |
| 116 | view |
| 117 | returns (bytes32) |
| 118 | { |
| 119 | return keyExists(toml, key) ? readBytes32(toml, key) : defaultValue; |
| 120 | } |
| 121 | |
| 122 | function readBytes32ArrayOr(string memory toml, string memory key, bytes32[] memory defaultValue) |
| 123 | internal |
| 124 | view |
| 125 | returns (bytes32[] memory) |
| 126 | { |
| 127 | return keyExists(toml, key) ? readBytes32Array(toml, key) : defaultValue; |
| 128 | } |
| 129 | |
| 130 | function readStringOr(string memory toml, string memory key, string memory defaultValue) |
| 131 | internal |
| 132 | view |
| 133 | returns (string memory) |
| 134 | { |
| 135 | return keyExists(toml, key) ? readString(toml, key) : defaultValue; |
| 136 | } |
| 137 | |
| 138 | function readStringArrayOr(string memory toml, string memory key, string[] memory defaultValue) |
| 139 | internal |
| 140 | view |
| 141 | returns (string[] memory) |
| 142 | { |
| 143 | return keyExists(toml, key) ? readStringArray(toml, key) : defaultValue; |
| 144 | } |
| 145 | |
| 146 | function readAddressOr(string memory toml, string memory key, address defaultValue) |
| 147 | internal |
| 148 | view |
| 149 | returns (address) |
| 150 | { |
| 151 | return keyExists(toml, key) ? readAddress(toml, key) : defaultValue; |
| 152 | } |
| 153 | |
| 154 | function readAddressArrayOr(string memory toml, string memory key, address[] memory defaultValue) |
| 155 | internal |
| 156 | view |
| 157 | returns (address[] memory) |
| 158 | { |
| 159 | return keyExists(toml, key) ? readAddressArray(toml, key) : defaultValue; |
| 160 | } |
| 161 | |
| 162 | function readBoolOr(string memory toml, string memory key, bool defaultValue) internal view returns (bool) { |
| 163 | return keyExists(toml, key) ? readBool(toml, key) : defaultValue; |
| 164 | } |
| 165 | |
| 166 | function readBoolArrayOr(string memory toml, string memory key, bool[] memory defaultValue) |
| 167 | internal |
| 168 | view |
| 169 | returns (bool[] memory) |
| 170 | { |
| 171 | return keyExists(toml, key) ? readBoolArray(toml, key) : defaultValue; |
| 172 | } |
| 173 | |
| 174 | function readBytesOr(string memory toml, string memory key, bytes memory defaultValue) |
| 175 | internal |
| 176 | view |
| 177 | returns (bytes memory) |
| 178 | { |
| 179 | return keyExists(toml, key) ? readBytes(toml, key) : defaultValue; |
| 180 | } |
| 181 | |
| 182 | function readBytesArrayOr(string memory toml, string memory key, bytes[] memory defaultValue) |
| 183 | internal |
| 184 | view |
| 185 | returns (bytes[] memory) |
| 186 | { |
| 187 | return keyExists(toml, key) ? readBytesArray(toml, key) : defaultValue; |
| 188 | } |
| 189 | |
| 190 | function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { |
| 191 | return vm.serializeJson(jsonKey, rootObject); |
| 192 | } |
| 193 | |
| 194 | function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { |
| 195 | return vm.serializeBool(jsonKey, key, value); |
| 196 | } |
| 197 | |
| 198 | function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) { |
| 199 | return vm.serializeBool(jsonKey, key, value); |
| 200 | } |
| 201 | |
| 202 | function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { |
| 203 | return vm.serializeUint(jsonKey, key, value); |
| 204 | } |
| 205 | |
| 206 | function serialize(string memory jsonKey, string memory key, uint256[] memory value) |
| 207 | internal |
| 208 | returns (string memory) |
| 209 | { |
| 210 | return vm.serializeUint(jsonKey, key, value); |
| 211 | } |
| 212 | |
| 213 | function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { |
| 214 | return vm.serializeInt(jsonKey, key, value); |
| 215 | } |
| 216 | |
| 217 | function serialize(string memory jsonKey, string memory key, int256[] memory value) |
| 218 | internal |
| 219 | returns (string memory) |
| 220 | { |
| 221 | return vm.serializeInt(jsonKey, key, value); |
| 222 | } |
| 223 | |
| 224 | function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { |
| 225 | return vm.serializeAddress(jsonKey, key, value); |
| 226 | } |
| 227 | |
| 228 | function serialize(string memory jsonKey, string memory key, address[] memory value) |
| 229 | internal |
| 230 | returns (string memory) |
| 231 | { |
| 232 | return vm.serializeAddress(jsonKey, key, value); |
| 233 | } |
| 234 | |
| 235 | function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { |
| 236 | return vm.serializeBytes32(jsonKey, key, value); |
| 237 | } |
| 238 | |
| 239 | function serialize(string memory jsonKey, string memory key, bytes32[] memory value) |
| 240 | internal |
| 241 | returns (string memory) |
| 242 | { |
| 243 | return vm.serializeBytes32(jsonKey, key, value); |
| 244 | } |
| 245 | |
| 246 | function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { |
| 247 | return vm.serializeBytes(jsonKey, key, value); |
| 248 | } |
| 249 | |
| 250 | function serialize(string memory jsonKey, string memory key, bytes[] memory value) |
| 251 | internal |
| 252 | returns (string memory) |
| 253 | { |
| 254 | return vm.serializeBytes(jsonKey, key, value); |
| 255 | } |
| 256 | |
| 257 | function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) { |
| 258 | return vm.serializeString(jsonKey, key, value); |
| 259 | } |
| 260 | |
| 261 | function serialize(string memory jsonKey, string memory key, string[] memory value) |
| 262 | internal |
| 263 | returns (string memory) |
| 264 | { |
| 265 | return vm.serializeString(jsonKey, key, value); |
| 266 | } |
| 267 | |
| 268 | function write(string memory jsonKey, string memory path) internal { |
| 269 | vm.writeToml(jsonKey, path); |
| 270 | } |
| 271 | |
| 272 | function write(string memory jsonKey, string memory path, string memory valueKey) internal { |
| 273 | vm.writeToml(jsonKey, path, valueKey); |
| 274 | } |
| 275 | } |
| 276 |
0.0%
lib/forge-std/src/StdUtils.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {IMulticall3} from "./interfaces/IMulticall3.sol"; |
| 5 | import {StdConstants} from "./StdConstants.sol"; |
| 6 | import {VmSafe} from "./Vm.sol"; |
| 7 | |
| 8 | abstract contract StdUtils { |
| 9 | /*////////////////////////////////////////////////////////////////////////// |
| 10 | CONSTANTS |
| 11 | //////////////////////////////////////////////////////////////////////////*/ |
| 12 | |
| 13 | VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); |
| 14 | address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; |
| 15 | uint256 private constant INT256_MIN_ABS = |
| 16 | 57896044618658097711785492504343953926634992332820282019728792003956564819968; |
| 17 | uint256 private constant SECP256K1_ORDER = |
| 18 | 115792089237316195423570985008687907852837564279074904382605163141518161494337; |
| 19 | uint256 private constant UINT256_MAX = |
| 20 | 115792089237316195423570985008687907853269984665640564039457584007913129639935; |
| 21 | |
| 22 | /*////////////////////////////////////////////////////////////////////////// |
| 23 | INTERNAL FUNCTIONS |
| 24 | //////////////////////////////////////////////////////////////////////////*/ |
| 25 | |
| 26 | function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { |
| 27 | require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min."); |
| 28 | // If x is between min and max, return x directly. This is to ensure that dictionary values |
| 29 | // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188 |
| 30 | if (x >= min && x <= max) return x; |
| 31 | |
| 32 | uint256 size = max - min + 1; |
| 33 | |
| 34 | // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side. |
| 35 | // This helps ensure coverage of the min/max values. |
| 36 | if (x <= 3 && size > x) return min + x; |
| 37 | if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x); |
| 38 | |
| 39 | // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive. |
| 40 | if (x > max) { |
| 41 | uint256 diff = x - max; |
| 42 | uint256 rem = diff % size; |
| 43 | if (rem == 0) return max; |
| 44 | result = min + rem - 1; |
| 45 | } else if (x < min) { |
| 46 | uint256 diff = min - x; |
| 47 | uint256 rem = diff % size; |
| 48 | if (rem == 0) return min; |
| 49 | result = max - rem + 1; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | function bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { |
| 54 | result = _bound(x, min, max); |
| 55 | } |
| 56 | |
| 57 | function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { |
| 58 | require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min."); |
| 59 | |
| 60 | // Shifting all int256 values to uint256 to use _bound function. The range of two types are: |
| 61 | // int256 : -(2**255) ~ (2**255 - 1) |
| 62 | // uint256: 0 ~ (2**256 - 1) |
| 63 | // So, add 2**255, INT256_MIN_ABS to the integer values. |
| 64 | // |
| 65 | // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow. |
| 66 | // So, use `~uint256(x) + 1` instead. |
| 67 | uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS); |
| 68 | uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS); |
| 69 | uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS); |
| 70 | |
| 71 | uint256 y = _bound(_x, _min, _max); |
| 72 | |
| 73 | // To move it back to int256 value, subtract INT256_MIN_ABS at here. |
| 74 | result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS); |
| 75 | } |
| 76 | |
| 77 | function bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { |
| 78 | result = _bound(x, min, max); |
| 79 | } |
| 80 | |
| 81 | function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) { |
| 82 | result = _bound(privateKey, 1, SECP256K1_ORDER - 1); |
| 83 | } |
| 84 | |
| 85 | function bytesToUint(bytes memory b) internal pure virtual returns (uint256) { |
| 86 | require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32."); |
| 87 | return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); |
| 88 | } |
| 89 | |
| 90 | /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce |
| 91 | function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) { |
| 92 | console2_log_StdUtils("computeCreateAddress is deprecated. Please use vm.computeCreateAddress instead."); |
| 93 | return vm.computeCreateAddress(deployer, nonce); |
| 94 | } |
| 95 | |
| 96 | function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer) |
| 97 | internal |
| 98 | pure |
| 99 | virtual |
| 100 | returns (address) |
| 101 | { |
| 102 | console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); |
| 103 | return vm.computeCreate2Address(salt, initcodeHash, deployer); |
| 104 | } |
| 105 | |
| 106 | /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer |
| 107 | function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) { |
| 108 | console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); |
| 109 | return vm.computeCreate2Address(salt, initCodeHash); |
| 110 | } |
| 111 | |
| 112 | /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments |
| 113 | /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode |
| 114 | function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) { |
| 115 | return hashInitCode(creationCode, ""); |
| 116 | } |
| 117 | |
| 118 | /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2 |
| 119 | /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode |
| 120 | /// @param args the ABI-encoded arguments to the constructor of C |
| 121 | function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) { |
| 122 | return keccak256(abi.encodePacked(creationCode, args)); |
| 123 | } |
| 124 | |
| 125 | // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses. |
| 126 | function getTokenBalances(address token, address[] memory addresses) |
| 127 | internal |
| 128 | virtual |
| 129 | returns (uint256[] memory balances) |
| 130 | { |
| 131 | uint256 tokenCodeSize; |
| 132 | assembly { |
| 133 | tokenCodeSize := extcodesize(token) |
| 134 | } |
| 135 | require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract."); |
| 136 | |
| 137 | // ABI encode the aggregate call to Multicall3. |
| 138 | uint256 length = addresses.length; |
| 139 | IMulticall3.Call[] memory calls = new IMulticall3.Call[](length); |
| 140 | for (uint256 i = 0; i < length; ++i) { |
| 141 | // 0x70a08231 = bytes4("balanceOf(address)")) |
| 142 | calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))}); |
| 143 | } |
| 144 | |
| 145 | // Make the aggregate call. |
| 146 | (, bytes[] memory returnData) = StdConstants.MULTICALL3_ADDRESS.aggregate(calls); |
| 147 | |
| 148 | // ABI decode the return data and return the balances. |
| 149 | balances = new uint256[](length); |
| 150 | for (uint256 i = 0; i < length; ++i) { |
| 151 | balances[i] = abi.decode(returnData[i], (uint256)); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /*////////////////////////////////////////////////////////////////////////// |
| 156 | PRIVATE FUNCTIONS |
| 157 | //////////////////////////////////////////////////////////////////////////*/ |
| 158 | |
| 159 | function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) { |
| 160 | return address(uint160(uint256(bytesValue))); |
| 161 | } |
| 162 | |
| 163 | // This section is used to prevent the compilation of console, which shortens the compilation time when console is |
| 164 | // not used elsewhere. We also trick the compiler into letting us make the console log methods as `pure` to avoid |
| 165 | // any breaking changes to function signatures. |
| 166 | function _castLogPayloadViewToPure(function(bytes memory) internal view fnIn) |
| 167 | internal |
| 168 | pure |
| 169 | returns (function(bytes memory) internal pure fnOut) |
| 170 | { |
| 171 | assembly { |
| 172 | fnOut := fnIn |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | function _sendLogPayload(bytes memory payload) internal pure { |
| 177 | _castLogPayloadViewToPure(_sendLogPayloadView)(payload); |
| 178 | } |
| 179 | |
| 180 | function _sendLogPayloadView(bytes memory payload) private view { |
| 181 | uint256 payloadLength = payload.length; |
| 182 | address consoleAddress = CONSOLE2_ADDRESS; |
| 183 | assembly ("memory-safe") { |
| 184 | let payloadStart := add(payload, 32) |
| 185 | let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | function console2_log_StdUtils(string memory p0) private pure { |
| 190 | _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); |
| 191 | } |
| 192 | |
| 193 | function console2_log_StdUtils(string memory p0, uint256 p1) private pure { |
| 194 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); |
| 195 | } |
| 196 | |
| 197 | function console2_log_StdUtils(string memory p0, string memory p1) private pure { |
| 198 | _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); |
| 199 | } |
| 200 | } |
| 201 |
0.0%
lib/forge-std/src/Test.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | // 💬 ABOUT |
| 5 | // Forge Std's default Test. |
| 6 | |
| 7 | // 🧩 MODULES |
| 8 | import {console} from "./console.sol"; |
| 9 | import {console2} from "./console2.sol"; |
| 10 | import {safeconsole} from "./safeconsole.sol"; |
| 11 | import {StdAssertions} from "./StdAssertions.sol"; |
| 12 | import {StdChains} from "./StdChains.sol"; |
| 13 | import {StdCheats} from "./StdCheats.sol"; |
| 14 | import {StdConstants} from "./StdConstants.sol"; |
| 15 | import {stdError} from "./StdError.sol"; |
| 16 | import {StdInvariant} from "./StdInvariant.sol"; |
| 17 | import {stdJson} from "./StdJson.sol"; |
| 18 | import {stdMath} from "./StdMath.sol"; |
| 19 | import {StdStorage, stdStorage} from "./StdStorage.sol"; |
| 20 | import {StdStyle} from "./StdStyle.sol"; |
| 21 | import {stdToml} from "./StdToml.sol"; |
| 22 | import {StdUtils} from "./StdUtils.sol"; |
| 23 | import {Vm} from "./Vm.sol"; |
| 24 | |
| 25 | // 📦 BOILERPLATE |
| 26 | import {TestBase} from "./Base.sol"; |
| 27 | |
| 28 | // ⭐️ TEST |
| 29 | abstract contract Test is TestBase, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils { |
| 30 | // Note: IS_TEST() must return true. |
| 31 | bool public IS_TEST = true; |
| 32 | } |
| 33 |
0.0%
lib/forge-std/src/Vm.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // Automatically @generated by scripts/vm.py. Do not modify manually. |
| 2 | |
| 3 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 4 | pragma solidity >=0.8.13 <0.9.0; |
| 5 | |
| 6 | /// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may |
| 7 | /// result in Script simulations differing from on-chain execution. It is recommended to only use |
| 8 | /// these cheats in scripts. |
| 9 | interface VmSafe { |
| 10 | /// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`. |
| 11 | enum CallerMode { |
| 12 | // No caller modification is currently active. |
| 13 | None, |
| 14 | // A one time broadcast triggered by a `vm.broadcast()` call is currently active. |
| 15 | Broadcast, |
| 16 | // A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active. |
| 17 | RecurrentBroadcast, |
| 18 | // A one time prank triggered by a `vm.prank()` call is currently active. |
| 19 | Prank, |
| 20 | // A recurrent prank triggered by a `vm.startPrank()` call is currently active. |
| 21 | RecurrentPrank |
| 22 | } |
| 23 | |
| 24 | /// The kind of account access that occurred. |
| 25 | enum AccountAccessKind { |
| 26 | // The account was called. |
| 27 | Call, |
| 28 | // The account was called via delegatecall. |
| 29 | DelegateCall, |
| 30 | // The account was called via callcode. |
| 31 | CallCode, |
| 32 | // The account was called via staticcall. |
| 33 | StaticCall, |
| 34 | // The account was created. |
| 35 | Create, |
| 36 | // The account was selfdestructed. |
| 37 | SelfDestruct, |
| 38 | // Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess). |
| 39 | Resume, |
| 40 | // The account's balance was read. |
| 41 | Balance, |
| 42 | // The account's codesize was read. |
| 43 | Extcodesize, |
| 44 | // The account's codehash was read. |
| 45 | Extcodehash, |
| 46 | // The account's code was copied. |
| 47 | Extcodecopy |
| 48 | } |
| 49 | |
| 50 | /// Forge execution contexts. |
| 51 | enum ForgeContext { |
| 52 | // Test group execution context (test, coverage or snapshot). |
| 53 | TestGroup, |
| 54 | // `forge test` execution context. |
| 55 | Test, |
| 56 | // `forge coverage` execution context. |
| 57 | Coverage, |
| 58 | // `forge snapshot` execution context. |
| 59 | Snapshot, |
| 60 | // Script group execution context (dry run, broadcast or resume). |
| 61 | ScriptGroup, |
| 62 | // `forge script` execution context. |
| 63 | ScriptDryRun, |
| 64 | // `forge script --broadcast` execution context. |
| 65 | ScriptBroadcast, |
| 66 | // `forge script --resume` execution context. |
| 67 | ScriptResume, |
| 68 | // Unknown `forge` execution context. |
| 69 | Unknown |
| 70 | } |
| 71 | |
| 72 | /// The transaction type (`txType`) of the broadcast. |
| 73 | enum BroadcastTxType { |
| 74 | // Represents a CALL broadcast tx. |
| 75 | Call, |
| 76 | // Represents a CREATE broadcast tx. |
| 77 | Create, |
| 78 | // Represents a CREATE2 broadcast tx. |
| 79 | Create2 |
| 80 | } |
| 81 | |
| 82 | /// An Ethereum log. Returned by `getRecordedLogs`. |
| 83 | struct Log { |
| 84 | // The topics of the log, including the signature, if any. |
| 85 | bytes32[] topics; |
| 86 | // The raw data of the log. |
| 87 | bytes data; |
| 88 | // The address of the log's emitter. |
| 89 | address emitter; |
| 90 | } |
| 91 | |
| 92 | /// An RPC URL and its alias. Returned by `rpcUrlStructs`. |
| 93 | struct Rpc { |
| 94 | // The alias of the RPC URL. |
| 95 | string key; |
| 96 | // The RPC URL. |
| 97 | string url; |
| 98 | } |
| 99 | |
| 100 | /// An RPC log object. Returned by `eth_getLogs`. |
| 101 | struct EthGetLogs { |
| 102 | // The address of the log's emitter. |
| 103 | address emitter; |
| 104 | // The topics of the log, including the signature, if any. |
| 105 | bytes32[] topics; |
| 106 | // The raw data of the log. |
| 107 | bytes data; |
| 108 | // The block hash. |
| 109 | bytes32 blockHash; |
| 110 | // The block number. |
| 111 | uint64 blockNumber; |
| 112 | // The transaction hash. |
| 113 | bytes32 transactionHash; |
| 114 | // The transaction index in the block. |
| 115 | uint64 transactionIndex; |
| 116 | // The log index. |
| 117 | uint256 logIndex; |
| 118 | // Whether the log was removed. |
| 119 | bool removed; |
| 120 | } |
| 121 | |
| 122 | /// A single entry in a directory listing. Returned by `readDir`. |
| 123 | struct DirEntry { |
| 124 | // The error message, if any. |
| 125 | string errorMessage; |
| 126 | // The path of the entry. |
| 127 | string path; |
| 128 | // The depth of the entry. |
| 129 | uint64 depth; |
| 130 | // Whether the entry is a directory. |
| 131 | bool isDir; |
| 132 | // Whether the entry is a symlink. |
| 133 | bool isSymlink; |
| 134 | } |
| 135 | |
| 136 | /// Metadata information about a file. |
| 137 | /// This structure is returned from the `fsMetadata` function and represents known |
| 138 | /// metadata about a file such as its permissions, size, modification |
| 139 | /// times, etc. |
| 140 | struct FsMetadata { |
| 141 | // True if this metadata is for a directory. |
| 142 | bool isDir; |
| 143 | // True if this metadata is for a symlink. |
| 144 | bool isSymlink; |
| 145 | // The size of the file, in bytes, this metadata is for. |
| 146 | uint256 length; |
| 147 | // True if this metadata is for a readonly (unwritable) file. |
| 148 | bool readOnly; |
| 149 | // The last modification time listed in this metadata. |
| 150 | uint256 modified; |
| 151 | // The last access time of this metadata. |
| 152 | uint256 accessed; |
| 153 | // The creation time listed in this metadata. |
| 154 | uint256 created; |
| 155 | } |
| 156 | |
| 157 | /// A wallet with a public and private key. |
| 158 | struct Wallet { |
| 159 | // The wallet's address. |
| 160 | address addr; |
| 161 | // The wallet's public key `X`. |
| 162 | uint256 publicKeyX; |
| 163 | // The wallet's public key `Y`. |
| 164 | uint256 publicKeyY; |
| 165 | // The wallet's private key. |
| 166 | uint256 privateKey; |
| 167 | } |
| 168 | |
| 169 | /// The result of a `tryFfi` call. |
| 170 | struct FfiResult { |
| 171 | // The exit code of the call. |
| 172 | int32 exitCode; |
| 173 | // The optionally hex-decoded `stdout` data. |
| 174 | bytes stdout; |
| 175 | // The `stderr` data. |
| 176 | bytes stderr; |
| 177 | } |
| 178 | |
| 179 | /// Information on the chain and fork. |
| 180 | struct ChainInfo { |
| 181 | // The fork identifier. Set to zero if no fork is active. |
| 182 | uint256 forkId; |
| 183 | // The chain ID of the current fork. |
| 184 | uint256 chainId; |
| 185 | } |
| 186 | |
| 187 | /// Information about a blockchain. |
| 188 | struct Chain { |
| 189 | // The chain name. |
| 190 | string name; |
| 191 | // The chain's Chain ID. |
| 192 | uint256 chainId; |
| 193 | // The chain's alias. (i.e. what gets specified in `foundry.toml`). |
| 194 | string chainAlias; |
| 195 | // A default RPC endpoint for this chain. |
| 196 | string rpcUrl; |
| 197 | } |
| 198 | |
| 199 | /// The result of a `stopAndReturnStateDiff` call. |
| 200 | struct AccountAccess { |
| 201 | // The chain and fork the access occurred. |
| 202 | ChainInfo chainInfo; |
| 203 | // The kind of account access that determines what the account is. |
| 204 | // If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee. |
| 205 | // If kind is Create, then the account is the newly created account. |
| 206 | // If kind is SelfDestruct, then the account is the selfdestruct recipient. |
| 207 | // If kind is a Resume, then account represents a account context that has resumed. |
| 208 | AccountAccessKind kind; |
| 209 | // The account that was accessed. |
| 210 | // It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT. |
| 211 | address account; |
| 212 | // What accessed the account. |
| 213 | address accessor; |
| 214 | // If the account was initialized or empty prior to the access. |
| 215 | // An account is considered initialized if it has code, a |
| 216 | // non-zero nonce, or a non-zero balance. |
| 217 | bool initialized; |
| 218 | // The previous balance of the accessed account. |
| 219 | uint256 oldBalance; |
| 220 | // The potential new balance of the accessed account. |
| 221 | // That is, all balance changes are recorded here, even if reverts occurred. |
| 222 | uint256 newBalance; |
| 223 | // Code of the account deployed by CREATE. |
| 224 | bytes deployedCode; |
| 225 | // Value passed along with the account access |
| 226 | uint256 value; |
| 227 | // Input data provided to the CREATE or CALL |
| 228 | bytes data; |
| 229 | // If this access reverted in either the current or parent context. |
| 230 | bool reverted; |
| 231 | // An ordered list of storage accesses made during an account access operation. |
| 232 | StorageAccess[] storageAccesses; |
| 233 | // Call depth traversed during the recording of state differences |
| 234 | uint64 depth; |
| 235 | // The previous nonce of the accessed account. |
| 236 | uint64 oldNonce; |
| 237 | // The new nonce of the accessed account. |
| 238 | uint64 newNonce; |
| 239 | } |
| 240 | |
| 241 | /// The storage accessed during an `AccountAccess`. |
| 242 | struct StorageAccess { |
| 243 | // The account whose storage was accessed. |
| 244 | address account; |
| 245 | // The slot that was accessed. |
| 246 | bytes32 slot; |
| 247 | // If the access was a write. |
| 248 | bool isWrite; |
| 249 | // The previous value of the slot. |
| 250 | bytes32 previousValue; |
| 251 | // The new value of the slot. |
| 252 | bytes32 newValue; |
| 253 | // If the access was reverted. |
| 254 | bool reverted; |
| 255 | } |
| 256 | |
| 257 | /// Gas used. Returned by `lastCallGas`. |
| 258 | struct Gas { |
| 259 | // The gas limit of the call. |
| 260 | uint64 gasLimit; |
| 261 | // The total gas used. |
| 262 | uint64 gasTotalUsed; |
| 263 | // DEPRECATED: The amount of gas used for memory expansion. Ref: <https://github.com/foundry-rs/foundry/pull/7934#pullrequestreview-2069236939> |
| 264 | uint64 gasMemoryUsed; |
| 265 | // The amount of gas refunded. |
| 266 | int64 gasRefunded; |
| 267 | // The amount of gas remaining. |
| 268 | uint64 gasRemaining; |
| 269 | } |
| 270 | |
| 271 | /// The result of the `stopDebugTraceRecording` call |
| 272 | struct DebugStep { |
| 273 | // The stack before executing the step of the run. |
| 274 | // stack\[0\] represents the top of the stack. |
| 275 | // and only stack data relevant to the opcode execution is contained. |
| 276 | uint256[] stack; |
| 277 | // The memory input data before executing the step of the run. |
| 278 | // only input data relevant to the opcode execution is contained. |
| 279 | // e.g. for MLOAD, it will have memory\[offset:offset+32\] copied here. |
| 280 | // the offset value can be get by the stack data. |
| 281 | bytes memoryInput; |
| 282 | // The opcode that was accessed. |
| 283 | uint8 opcode; |
| 284 | // The call depth of the step. |
| 285 | uint64 depth; |
| 286 | // Whether the call end up with out of gas error. |
| 287 | bool isOutOfGas; |
| 288 | // The contract address where the opcode is running |
| 289 | address contractAddr; |
| 290 | } |
| 291 | |
| 292 | /// Represents a transaction's broadcast details. |
| 293 | struct BroadcastTxSummary { |
| 294 | // The hash of the transaction that was broadcasted |
| 295 | bytes32 txHash; |
| 296 | // Represent the type of transaction among CALL, CREATE, CREATE2 |
| 297 | BroadcastTxType txType; |
| 298 | // The address of the contract that was called or created. |
| 299 | // This is address of the contract that is created if the txType is CREATE or CREATE2. |
| 300 | address contractAddress; |
| 301 | // The block number the transaction landed in. |
| 302 | uint64 blockNumber; |
| 303 | // Status of the transaction, retrieved from the transaction receipt. |
| 304 | bool success; |
| 305 | } |
| 306 | |
| 307 | /// Holds a signed EIP-7702 authorization for an authority account to delegate to an implementation. |
| 308 | struct SignedDelegation { |
| 309 | // The y-parity of the recovered secp256k1 signature (0 or 1). |
| 310 | uint8 v; |
| 311 | // First 32 bytes of the signature. |
| 312 | bytes32 r; |
| 313 | // Second 32 bytes of the signature. |
| 314 | bytes32 s; |
| 315 | // The current nonce of the authority account at signing time. |
| 316 | // Used to ensure signature can't be replayed after account nonce changes. |
| 317 | uint64 nonce; |
| 318 | // Address of the contract implementation that will be delegated to. |
| 319 | // Gets encoded into delegation code: 0xef0100 || implementation. |
| 320 | address implementation; |
| 321 | } |
| 322 | |
| 323 | /// Represents a "potential" revert reason from a single subsequent call when using `vm.assumeNoReverts`. |
| 324 | /// Reverts that match will result in a FOUNDRY::ASSUME rejection, whereas unmatched reverts will be surfaced |
| 325 | /// as normal. |
| 326 | struct PotentialRevert { |
| 327 | // The allowed origin of the revert opcode; address(0) allows reverts from any address |
| 328 | address reverter; |
| 329 | // When true, only matches on the beginning of the revert data, otherwise, matches on entire revert data |
| 330 | bool partialMatch; |
| 331 | // The data to use to match encountered reverts |
| 332 | bytes revertData; |
| 333 | } |
| 334 | |
| 335 | /// An EIP-2930 access list item. |
| 336 | struct AccessListItem { |
| 337 | // The address to be added in access list. |
| 338 | address target; |
| 339 | // The storage keys to be added in access list. |
| 340 | bytes32[] storageKeys; |
| 341 | } |
| 342 | |
| 343 | // ======== Crypto ======== |
| 344 | |
| 345 | /// Derives a private key from the name, labels the account with that name, and returns the wallet. |
| 346 | function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); |
| 347 | |
| 348 | /// Generates a wallet from the private key and returns the wallet. |
| 349 | function createWallet(uint256 privateKey) external returns (Wallet memory wallet); |
| 350 | |
| 351 | /// Generates a wallet from the private key, labels the account with that name, and returns the wallet. |
| 352 | function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); |
| 353 | |
| 354 | /// Derive a private key from a provided mnemonic string (or mnemonic file path) |
| 355 | /// at the derivation path `m/44'/60'/0'/0/{index}`. |
| 356 | function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); |
| 357 | |
| 358 | /// Derive a private key from a provided mnemonic string (or mnemonic file path) |
| 359 | /// at `{derivationPath}{index}`. |
| 360 | function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) |
| 361 | external |
| 362 | pure |
| 363 | returns (uint256 privateKey); |
| 364 | |
| 365 | /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language |
| 366 | /// at the derivation path `m/44'/60'/0'/0/{index}`. |
| 367 | function deriveKey(string calldata mnemonic, uint32 index, string calldata language) |
| 368 | external |
| 369 | pure |
| 370 | returns (uint256 privateKey); |
| 371 | |
| 372 | /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language |
| 373 | /// at `{derivationPath}{index}`. |
| 374 | function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) |
| 375 | external |
| 376 | pure |
| 377 | returns (uint256 privateKey); |
| 378 | |
| 379 | /// Derives secp256r1 public key from the provided `privateKey`. |
| 380 | function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY); |
| 381 | |
| 382 | /// Adds a private key to the local forge wallet and returns the address. |
| 383 | function rememberKey(uint256 privateKey) external returns (address keyAddr); |
| 384 | |
| 385 | /// Derive a set number of wallets from a mnemonic at the derivation path `m/44'/60'/0'/0/{0..count}`. |
| 386 | /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. |
| 387 | function rememberKeys(string calldata mnemonic, string calldata derivationPath, uint32 count) |
| 388 | external |
| 389 | returns (address[] memory keyAddrs); |
| 390 | |
| 391 | /// Derive a set number of wallets from a mnemonic in the specified language at the derivation path `m/44'/60'/0'/0/{0..count}`. |
| 392 | /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. |
| 393 | function rememberKeys( |
| 394 | string calldata mnemonic, |
| 395 | string calldata derivationPath, |
| 396 | string calldata language, |
| 397 | uint32 count |
| 398 | ) external returns (address[] memory keyAddrs); |
| 399 | |
| 400 | /// Signs data with a `Wallet`. |
| 401 | /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the |
| 402 | /// signature's `s` value, and the recovery id `v` in a single bytes32. |
| 403 | /// This format reduces the signature size from 65 to 64 bytes. |
| 404 | function signCompact(Wallet calldata wallet, bytes32 digest) external returns (bytes32 r, bytes32 vs); |
| 405 | |
| 406 | /// Signs `digest` with `privateKey` using the secp256k1 curve. |
| 407 | /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the |
| 408 | /// signature's `s` value, and the recovery id `v` in a single bytes32. |
| 409 | /// This format reduces the signature size from 65 to 64 bytes. |
| 410 | function signCompact(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); |
| 411 | |
| 412 | /// Signs `digest` with signer provided to script using the secp256k1 curve. |
| 413 | /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the |
| 414 | /// signature's `s` value, and the recovery id `v` in a single bytes32. |
| 415 | /// This format reduces the signature size from 65 to 64 bytes. |
| 416 | /// If `--sender` is provided, the signer with provided address is used, otherwise, |
| 417 | /// if exactly one signer is provided to the script, that signer is used. |
| 418 | /// Raises error if signer passed through `--sender` does not match any unlocked signers or |
| 419 | /// if `--sender` is not provided and not exactly one signer is passed to the script. |
| 420 | function signCompact(bytes32 digest) external pure returns (bytes32 r, bytes32 vs); |
| 421 | |
| 422 | /// Signs `digest` with signer provided to script using the secp256k1 curve. |
| 423 | /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the |
| 424 | /// signature's `s` value, and the recovery id `v` in a single bytes32. |
| 425 | /// This format reduces the signature size from 65 to 64 bytes. |
| 426 | /// Raises error if none of the signers passed into the script have provided address. |
| 427 | function signCompact(address signer, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); |
| 428 | |
| 429 | /// Signs `digest` with `privateKey` using the secp256r1 curve. |
| 430 | function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); |
| 431 | |
| 432 | /// Signs `digest` with `privateKey` on the secp256k1 curve, using the given `nonce` |
| 433 | /// as the raw ephemeral k value in ECDSA (instead of deriving it deterministically). |
| 434 | function signWithNonceUnsafe(uint256 privateKey, bytes32 digest, uint256 nonce) |
| 435 | external |
| 436 | pure |
| 437 | returns (uint8 v, bytes32 r, bytes32 s); |
| 438 | |
| 439 | /// Signs data with a `Wallet`. |
| 440 | function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); |
| 441 | |
| 442 | /// Signs `digest` with `privateKey` using the secp256k1 curve. |
| 443 | function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); |
| 444 | |
| 445 | /// Signs `digest` with signer provided to script using the secp256k1 curve. |
| 446 | /// If `--sender` is provided, the signer with provided address is used, otherwise, |
| 447 | /// if exactly one signer is provided to the script, that signer is used. |
| 448 | /// Raises error if signer passed through `--sender` does not match any unlocked signers or |
| 449 | /// if `--sender` is not provided and not exactly one signer is passed to the script. |
| 450 | function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); |
| 451 | |
| 452 | /// Signs `digest` with signer provided to script using the secp256k1 curve. |
| 453 | /// Raises error if none of the signers passed into the script have provided address. |
| 454 | function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); |
| 455 | |
| 456 | // ======== Environment ======== |
| 457 | |
| 458 | /// Gets the environment variable `name` and parses it as `address`. |
| 459 | /// Reverts if the variable was not found or could not be parsed. |
| 460 | function envAddress(string calldata name) external view returns (address value); |
| 461 | |
| 462 | /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. |
| 463 | /// Reverts if the variable was not found or could not be parsed. |
| 464 | function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value); |
| 465 | |
| 466 | /// Gets the environment variable `name` and parses it as `bool`. |
| 467 | /// Reverts if the variable was not found or could not be parsed. |
| 468 | function envBool(string calldata name) external view returns (bool value); |
| 469 | |
| 470 | /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. |
| 471 | /// Reverts if the variable was not found or could not be parsed. |
| 472 | function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value); |
| 473 | |
| 474 | /// Gets the environment variable `name` and parses it as `bytes32`. |
| 475 | /// Reverts if the variable was not found or could not be parsed. |
| 476 | function envBytes32(string calldata name) external view returns (bytes32 value); |
| 477 | |
| 478 | /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. |
| 479 | /// Reverts if the variable was not found or could not be parsed. |
| 480 | function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value); |
| 481 | |
| 482 | /// Gets the environment variable `name` and parses it as `bytes`. |
| 483 | /// Reverts if the variable was not found or could not be parsed. |
| 484 | function envBytes(string calldata name) external view returns (bytes memory value); |
| 485 | |
| 486 | /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. |
| 487 | /// Reverts if the variable was not found or could not be parsed. |
| 488 | function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value); |
| 489 | |
| 490 | /// Gets the environment variable `name` and returns true if it exists, else returns false. |
| 491 | function envExists(string calldata name) external view returns (bool result); |
| 492 | |
| 493 | /// Gets the environment variable `name` and parses it as `int256`. |
| 494 | /// Reverts if the variable was not found or could not be parsed. |
| 495 | function envInt(string calldata name) external view returns (int256 value); |
| 496 | |
| 497 | /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. |
| 498 | /// Reverts if the variable was not found or could not be parsed. |
| 499 | function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value); |
| 500 | |
| 501 | /// Gets the environment variable `name` and parses it as `bool`. |
| 502 | /// Reverts if the variable could not be parsed. |
| 503 | /// Returns `defaultValue` if the variable was not found. |
| 504 | function envOr(string calldata name, bool defaultValue) external view returns (bool value); |
| 505 | |
| 506 | /// Gets the environment variable `name` and parses it as `uint256`. |
| 507 | /// Reverts if the variable could not be parsed. |
| 508 | /// Returns `defaultValue` if the variable was not found. |
| 509 | function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value); |
| 510 | |
| 511 | /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. |
| 512 | /// Reverts if the variable could not be parsed. |
| 513 | /// Returns `defaultValue` if the variable was not found. |
| 514 | function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) |
| 515 | external |
| 516 | view |
| 517 | returns (address[] memory value); |
| 518 | |
| 519 | /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. |
| 520 | /// Reverts if the variable could not be parsed. |
| 521 | /// Returns `defaultValue` if the variable was not found. |
| 522 | function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) |
| 523 | external |
| 524 | view |
| 525 | returns (bytes32[] memory value); |
| 526 | |
| 527 | /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. |
| 528 | /// Reverts if the variable could not be parsed. |
| 529 | /// Returns `defaultValue` if the variable was not found. |
| 530 | function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) |
| 531 | external |
| 532 | view |
| 533 | returns (string[] memory value); |
| 534 | |
| 535 | /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. |
| 536 | /// Reverts if the variable could not be parsed. |
| 537 | /// Returns `defaultValue` if the variable was not found. |
| 538 | function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) |
| 539 | external |
| 540 | view |
| 541 | returns (bytes[] memory value); |
| 542 | |
| 543 | /// Gets the environment variable `name` and parses it as `int256`. |
| 544 | /// Reverts if the variable could not be parsed. |
| 545 | /// Returns `defaultValue` if the variable was not found. |
| 546 | function envOr(string calldata name, int256 defaultValue) external view returns (int256 value); |
| 547 | |
| 548 | /// Gets the environment variable `name` and parses it as `address`. |
| 549 | /// Reverts if the variable could not be parsed. |
| 550 | /// Returns `defaultValue` if the variable was not found. |
| 551 | function envOr(string calldata name, address defaultValue) external view returns (address value); |
| 552 | |
| 553 | /// Gets the environment variable `name` and parses it as `bytes32`. |
| 554 | /// Reverts if the variable could not be parsed. |
| 555 | /// Returns `defaultValue` if the variable was not found. |
| 556 | function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value); |
| 557 | |
| 558 | /// Gets the environment variable `name` and parses it as `string`. |
| 559 | /// Reverts if the variable could not be parsed. |
| 560 | /// Returns `defaultValue` if the variable was not found. |
| 561 | function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value); |
| 562 | |
| 563 | /// Gets the environment variable `name` and parses it as `bytes`. |
| 564 | /// Reverts if the variable could not be parsed. |
| 565 | /// Returns `defaultValue` if the variable was not found. |
| 566 | function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value); |
| 567 | |
| 568 | /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. |
| 569 | /// Reverts if the variable could not be parsed. |
| 570 | /// Returns `defaultValue` if the variable was not found. |
| 571 | function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) |
| 572 | external |
| 573 | view |
| 574 | returns (bool[] memory value); |
| 575 | |
| 576 | /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. |
| 577 | /// Reverts if the variable could not be parsed. |
| 578 | /// Returns `defaultValue` if the variable was not found. |
| 579 | function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) |
| 580 | external |
| 581 | view |
| 582 | returns (uint256[] memory value); |
| 583 | |
| 584 | /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. |
| 585 | /// Reverts if the variable could not be parsed. |
| 586 | /// Returns `defaultValue` if the variable was not found. |
| 587 | function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) |
| 588 | external |
| 589 | view |
| 590 | returns (int256[] memory value); |
| 591 | |
| 592 | /// Gets the environment variable `name` and parses it as `string`. |
| 593 | /// Reverts if the variable was not found or could not be parsed. |
| 594 | function envString(string calldata name) external view returns (string memory value); |
| 595 | |
| 596 | /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. |
| 597 | /// Reverts if the variable was not found or could not be parsed. |
| 598 | function envString(string calldata name, string calldata delim) external view returns (string[] memory value); |
| 599 | |
| 600 | /// Gets the environment variable `name` and parses it as `uint256`. |
| 601 | /// Reverts if the variable was not found or could not be parsed. |
| 602 | function envUint(string calldata name) external view returns (uint256 value); |
| 603 | |
| 604 | /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. |
| 605 | /// Reverts if the variable was not found or could not be parsed. |
| 606 | function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value); |
| 607 | |
| 608 | /// Returns true if `forge` command was executed in given context. |
| 609 | function isContext(ForgeContext context) external view returns (bool result); |
| 610 | |
| 611 | /// Resolves the env variable placeholders of a given input string. |
| 612 | function resolveEnv(string calldata input) external returns (string memory); |
| 613 | |
| 614 | /// Sets environment variables. |
| 615 | function setEnv(string calldata name, string calldata value) external; |
| 616 | |
| 617 | // ======== EVM ======== |
| 618 | |
| 619 | /// Gets all accessed reads and write slot from a `vm.record` session, for a given address. |
| 620 | function accesses(address target) external view returns (bytes32[] memory readSlots, bytes32[] memory writeSlots); |
| 621 | |
| 622 | /// Gets the address for a given private key. |
| 623 | function addr(uint256 privateKey) external pure returns (address keyAddr); |
| 624 | |
| 625 | /// Gets all the logs according to specified filter. |
| 626 | function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics) |
| 627 | external |
| 628 | view |
| 629 | returns (EthGetLogs[] memory logs); |
| 630 | |
| 631 | /// Gets the current `block.blobbasefee`. |
| 632 | /// You should use this instead of `block.blobbasefee` if you use `vm.blobBaseFee`, as `block.blobbasefee` is assumed to be constant across a transaction, |
| 633 | /// and as a result will get optimized out by the compiler. |
| 634 | /// See https://github.com/foundry-rs/foundry/issues/6180 |
| 635 | function getBlobBaseFee() external view returns (uint256 blobBaseFee); |
| 636 | |
| 637 | /// Gets the current `block.number`. |
| 638 | /// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction, |
| 639 | /// and as a result will get optimized out by the compiler. |
| 640 | /// See https://github.com/foundry-rs/foundry/issues/6180 |
| 641 | function getBlockNumber() external view returns (uint256 height); |
| 642 | |
| 643 | /// Gets the current `block.timestamp`. |
| 644 | /// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction, |
| 645 | /// and as a result will get optimized out by the compiler. |
| 646 | /// See https://github.com/foundry-rs/foundry/issues/6180 |
| 647 | function getBlockTimestamp() external view returns (uint256 timestamp); |
| 648 | |
| 649 | /// Gets the current `block.chainid` of the currently selected environment. |
| 650 | /// You should use this instead of `block.chainid` if you use `vm.selectFork` or `vm.createSelectFork`, as `block.chainid` could be assumed |
| 651 | /// to be constant across a transaction, and as a result will get optimized out by the compiler. |
| 652 | /// See https://github.com/foundry-rs/foundry/issues/6180 |
| 653 | function getChainId() external view returns (uint256 blockChainId); |
| 654 | |
| 655 | /// Returns the test or script execution evm version. |
| 656 | /// **Note:** The execution evm version is not the same as the compilation one. |
| 657 | function getEvmVersion() external pure returns (string memory evm); |
| 658 | |
| 659 | /// Gets the map key and parent of a mapping at a given slot, for a given address. |
| 660 | function getMappingKeyAndParentOf(address target, bytes32 elementSlot) |
| 661 | external |
| 662 | view |
| 663 | returns (bool found, bytes32 key, bytes32 parent); |
| 664 | |
| 665 | /// Gets the number of elements in the mapping at the given slot, for a given address. |
| 666 | function getMappingLength(address target, bytes32 mappingSlot) external view returns (uint256 length); |
| 667 | |
| 668 | /// Gets the elements at index idx of the mapping at the given slot, for a given address. The |
| 669 | /// index must be less than the length of the mapping (i.e. the number of keys in the mapping). |
| 670 | function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external view returns (bytes32 value); |
| 671 | |
| 672 | /// Gets the nonce of an account. |
| 673 | function getNonce(address account) external view returns (uint64 nonce); |
| 674 | |
| 675 | /// Get the nonce of a `Wallet`. |
| 676 | function getNonce(Wallet calldata wallet) external view returns (uint64 nonce); |
| 677 | |
| 678 | /// Gets the RLP encoded block header for a given block number. |
| 679 | /// Returns the block header in the same format as `cast block <block_number> --raw`. |
| 680 | function getRawBlockHeader(uint256 blockNumber) external view returns (bytes memory rlpHeader); |
| 681 | |
| 682 | /// Gets all the recorded logs. |
| 683 | function getRecordedLogs() external view returns (Log[] memory logs); |
| 684 | |
| 685 | /// Returns state diffs from current `vm.startStateDiffRecording` session. |
| 686 | function getStateDiff() external view returns (string memory diff); |
| 687 | |
| 688 | /// Returns state diffs from current `vm.startStateDiffRecording` session, in json format. |
| 689 | function getStateDiffJson() external view returns (string memory diff); |
| 690 | |
| 691 | /// Returns an array of `StorageAccess` from current `vm.stateStateDiffRecording` session |
| 692 | function getStorageAccesses() external view returns (StorageAccess[] memory storageAccesses); |
| 693 | |
| 694 | /// Returns an array of storage slots occupied by the specified variable. |
| 695 | function getStorageSlots(address target, string calldata variableName) |
| 696 | external |
| 697 | view |
| 698 | returns (uint256[] memory slots); |
| 699 | |
| 700 | /// Gets the gas used in the last call from the callee perspective. |
| 701 | function lastCallGas() external view returns (Gas memory gas); |
| 702 | |
| 703 | /// Loads a storage slot from an address. |
| 704 | function load(address target, bytes32 slot) external view returns (bytes32 data); |
| 705 | |
| 706 | /// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused. |
| 707 | function pauseGasMetering() external; |
| 708 | |
| 709 | /// Records all storage reads and writes. Use `accesses` to get the recorded data. |
| 710 | /// Subsequent calls to `record` will clear the previous data. |
| 711 | function record() external; |
| 712 | |
| 713 | /// Record all the transaction logs. |
| 714 | function recordLogs() external; |
| 715 | |
| 716 | /// Reset gas metering (i.e. gas usage is set to gas limit). |
| 717 | function resetGasMetering() external; |
| 718 | |
| 719 | /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. |
| 720 | function resumeGasMetering() external; |
| 721 | |
| 722 | /// Performs an Ethereum JSON-RPC request to the current fork URL. |
| 723 | function rpc(string calldata method, string calldata params) external returns (bytes memory data); |
| 724 | |
| 725 | /// Performs an Ethereum JSON-RPC request to the given endpoint. |
| 726 | function rpc(string calldata urlOrAlias, string calldata method, string calldata params) |
| 727 | external |
| 728 | returns (bytes memory data); |
| 729 | |
| 730 | /// Set the exact test or script execution evm version, e.g. `berlin`, `cancun`. |
| 731 | /// **Note:** The execution evm version is not the same as the compilation one. |
| 732 | function setEvmVersion(string calldata evm) external; |
| 733 | |
| 734 | /// Records the debug trace during the run. |
| 735 | function startDebugTraceRecording() external; |
| 736 | |
| 737 | /// Starts recording all map SSTOREs for later retrieval. |
| 738 | function startMappingRecording() external; |
| 739 | |
| 740 | /// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order, |
| 741 | /// along with the context of the calls |
| 742 | function startStateDiffRecording() external; |
| 743 | |
| 744 | /// Stop debug trace recording and returns the recorded debug trace. |
| 745 | function stopAndReturnDebugTraceRecording() external returns (DebugStep[] memory step); |
| 746 | |
| 747 | /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session. |
| 748 | function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses); |
| 749 | |
| 750 | /// Stops recording all map SSTOREs for later retrieval and clears the recorded data. |
| 751 | function stopMappingRecording() external; |
| 752 | |
| 753 | /// Stops recording storage reads and writes. |
| 754 | function stopRecord() external; |
| 755 | |
| 756 | // ======== Filesystem ======== |
| 757 | |
| 758 | /// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine. |
| 759 | /// `path` is relative to the project root. |
| 760 | function closeFile(string calldata path) external; |
| 761 | |
| 762 | /// Copies the contents of one file to another. This function will **overwrite** the contents of `to`. |
| 763 | /// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`. |
| 764 | /// Both `from` and `to` are relative to the project root. |
| 765 | function copyFile(string calldata from, string calldata to) external returns (uint64 copied); |
| 766 | |
| 767 | /// Creates a new, empty directory at the provided path. |
| 768 | /// This cheatcode will revert in the following situations, but is not limited to just these cases: |
| 769 | /// - User lacks permissions to modify `path`. |
| 770 | /// - A parent of the given path doesn't exist and `recursive` is false. |
| 771 | /// - `path` already exists and `recursive` is false. |
| 772 | /// `path` is relative to the project root. |
| 773 | function createDir(string calldata path, bool recursive) external; |
| 774 | |
| 775 | /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the |
| 776 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 777 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 778 | function deployCode(string calldata artifactPath) external returns (address deployedAddress); |
| 779 | |
| 780 | /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the |
| 781 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 782 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 783 | /// Additionally accepts abi-encoded constructor arguments. |
| 784 | function deployCode(string calldata artifactPath, bytes calldata constructorArgs) |
| 785 | external |
| 786 | returns (address deployedAddress); |
| 787 | |
| 788 | /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the |
| 789 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 790 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 791 | /// Additionally accepts `msg.value`. |
| 792 | function deployCode(string calldata artifactPath, uint256 value) external returns (address deployedAddress); |
| 793 | |
| 794 | /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the |
| 795 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 796 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 797 | /// Additionally accepts abi-encoded constructor arguments and `msg.value`. |
| 798 | function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value) |
| 799 | external |
| 800 | returns (address deployedAddress); |
| 801 | |
| 802 | /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the |
| 803 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 804 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 805 | function deployCode(string calldata artifactPath, bytes32 salt) external returns (address deployedAddress); |
| 806 | |
| 807 | /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the |
| 808 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 809 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 810 | /// Additionally accepts abi-encoded constructor arguments. |
| 811 | function deployCode(string calldata artifactPath, bytes calldata constructorArgs, bytes32 salt) |
| 812 | external |
| 813 | returns (address deployedAddress); |
| 814 | |
| 815 | /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the |
| 816 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 817 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 818 | /// Additionally accepts `msg.value`. |
| 819 | function deployCode(string calldata artifactPath, uint256 value, bytes32 salt) |
| 820 | external |
| 821 | returns (address deployedAddress); |
| 822 | |
| 823 | /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the |
| 824 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 825 | /// Reverts if the target artifact contains unlinked library placeholders. |
| 826 | /// Additionally accepts abi-encoded constructor arguments and `msg.value`. |
| 827 | function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value, bytes32 salt) |
| 828 | external |
| 829 | returns (address deployedAddress); |
| 830 | |
| 831 | /// Returns true if the given path points to an existing entity, else returns false. |
| 832 | function exists(string calldata path) external view returns (bool result); |
| 833 | |
| 834 | /// Performs a foreign function call via the terminal. |
| 835 | function ffi(string[] calldata commandInput) external returns (bytes memory result); |
| 836 | |
| 837 | /// Given a path, query the file system to get information about a file, directory, etc. |
| 838 | function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); |
| 839 | |
| 840 | /// Gets the artifact path from code (aka. creation code). |
| 841 | function getArtifactPathByCode(bytes calldata code) external view returns (string memory path); |
| 842 | |
| 843 | /// Gets the artifact path from deployed code (aka. runtime code). |
| 844 | function getArtifactPathByDeployedCode(bytes calldata deployedCode) external view returns (string memory path); |
| 845 | |
| 846 | /// Returns the most recent broadcast for the given contract on `chainId` matching `txType`. |
| 847 | /// For example: |
| 848 | /// The most recent deployment can be fetched by passing `txType` as `CREATE` or `CREATE2`. |
| 849 | /// The most recent call can be fetched by passing `txType` as `CALL`. |
| 850 | function getBroadcast(string calldata contractName, uint64 chainId, BroadcastTxType txType) |
| 851 | external |
| 852 | view |
| 853 | returns (BroadcastTxSummary memory); |
| 854 | |
| 855 | /// Returns all broadcasts for the given contract on `chainId` with the specified `txType`. |
| 856 | /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber. |
| 857 | function getBroadcasts(string calldata contractName, uint64 chainId, BroadcastTxType txType) |
| 858 | external |
| 859 | view |
| 860 | returns (BroadcastTxSummary[] memory); |
| 861 | |
| 862 | /// Returns all broadcasts for the given contract on `chainId`. |
| 863 | /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber. |
| 864 | function getBroadcasts(string calldata contractName, uint64 chainId) |
| 865 | external |
| 866 | view |
| 867 | returns (BroadcastTxSummary[] memory); |
| 868 | |
| 869 | /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the |
| 870 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 871 | function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); |
| 872 | |
| 873 | /// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file or the path to the |
| 874 | /// artifact in the form of <path>:<contract>:<version> where <contract> and <version> parts are optional. |
| 875 | function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode); |
| 876 | |
| 877 | /// Returns the most recent deployment for the current `chainId`. |
| 878 | function getDeployment(string calldata contractName) external view returns (address deployedAddress); |
| 879 | |
| 880 | /// Returns the most recent deployment for the given contract on `chainId` |
| 881 | function getDeployment(string calldata contractName, uint64 chainId) external view returns (address deployedAddress); |
| 882 | |
| 883 | /// Returns all deployments for the given contract on `chainId` |
| 884 | /// Sorted in descending order of deployment time i.e descending order of BroadcastTxSummary.blockNumber. |
| 885 | /// The most recent deployment is the first element, and the oldest is the last. |
| 886 | function getDeployments(string calldata contractName, uint64 chainId) |
| 887 | external |
| 888 | view |
| 889 | returns (address[] memory deployedAddresses); |
| 890 | |
| 891 | /// Returns true if the path exists on disk and is pointing at a directory, else returns false. |
| 892 | function isDir(string calldata path) external view returns (bool result); |
| 893 | |
| 894 | /// Returns true if the path exists on disk and is pointing at a regular file, else returns false. |
| 895 | function isFile(string calldata path) external view returns (bool result); |
| 896 | |
| 897 | /// Get the path of the current project root. |
| 898 | function projectRoot() external view returns (string memory path); |
| 899 | |
| 900 | /// Prompts the user for a string value in the terminal. |
| 901 | function prompt(string calldata promptText) external returns (string memory input); |
| 902 | |
| 903 | /// Prompts the user for an address in the terminal. |
| 904 | function promptAddress(string calldata promptText) external returns (address); |
| 905 | |
| 906 | /// Prompts the user for a hidden string value in the terminal. |
| 907 | function promptSecret(string calldata promptText) external returns (string memory input); |
| 908 | |
| 909 | /// Prompts the user for hidden uint256 in the terminal (usually pk). |
| 910 | function promptSecretUint(string calldata promptText) external returns (uint256); |
| 911 | |
| 912 | /// Prompts the user for uint256 in the terminal. |
| 913 | function promptUint(string calldata promptText) external returns (uint256); |
| 914 | |
| 915 | /// Reads the directory at the given path recursively, up to `maxDepth`. |
| 916 | /// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned. |
| 917 | /// Follows symbolic links if `followLinks` is true. |
| 918 | function readDir(string calldata path) external view returns (DirEntry[] memory entries); |
| 919 | |
| 920 | /// See `readDir(string)`. |
| 921 | function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries); |
| 922 | |
| 923 | /// See `readDir(string)`. |
| 924 | function readDir(string calldata path, uint64 maxDepth, bool followLinks) |
| 925 | external |
| 926 | view |
| 927 | returns (DirEntry[] memory entries); |
| 928 | |
| 929 | /// Reads the entire content of file to string. `path` is relative to the project root. |
| 930 | function readFile(string calldata path) external view returns (string memory data); |
| 931 | |
| 932 | /// Reads the entire content of file as binary. `path` is relative to the project root. |
| 933 | function readFileBinary(string calldata path) external view returns (bytes memory data); |
| 934 | |
| 935 | /// Reads next line of file to string. |
| 936 | function readLine(string calldata path) external view returns (string memory line); |
| 937 | |
| 938 | /// Reads a symbolic link, returning the path that the link points to. |
| 939 | /// This cheatcode will revert in the following situations, but is not limited to just these cases: |
| 940 | /// - `path` is not a symbolic link. |
| 941 | /// - `path` does not exist. |
| 942 | function readLink(string calldata linkPath) external view returns (string memory targetPath); |
| 943 | |
| 944 | /// Removes a directory at the provided path. |
| 945 | /// This cheatcode will revert in the following situations, but is not limited to just these cases: |
| 946 | /// - `path` doesn't exist. |
| 947 | /// - `path` isn't a directory. |
| 948 | /// - User lacks permissions to modify `path`. |
| 949 | /// - The directory is not empty and `recursive` is false. |
| 950 | /// `path` is relative to the project root. |
| 951 | function removeDir(string calldata path, bool recursive) external; |
| 952 | |
| 953 | /// Removes a file from the filesystem. |
| 954 | /// This cheatcode will revert in the following situations, but is not limited to just these cases: |
| 955 | /// - `path` points to a directory. |
| 956 | /// - The file doesn't exist. |
| 957 | /// - The user lacks permissions to remove the file. |
| 958 | /// `path` is relative to the project root. |
| 959 | function removeFile(string calldata path) external; |
| 960 | |
| 961 | /// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr. |
| 962 | function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result); |
| 963 | |
| 964 | /// Returns the time since unix epoch in milliseconds. |
| 965 | function unixTime() external view returns (uint256 milliseconds); |
| 966 | |
| 967 | /// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does. |
| 968 | /// `path` is relative to the project root. |
| 969 | function writeFile(string calldata path, string calldata data) external; |
| 970 | |
| 971 | /// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does. |
| 972 | /// `path` is relative to the project root. |
| 973 | function writeFileBinary(string calldata path, bytes calldata data) external; |
| 974 | |
| 975 | /// Writes line to file, creating a file if it does not exist. |
| 976 | /// `path` is relative to the project root. |
| 977 | function writeLine(string calldata path, string calldata data) external; |
| 978 | |
| 979 | // ======== JSON ======== |
| 980 | |
| 981 | /// Checks if `key` exists in a JSON object. |
| 982 | function keyExistsJson(string calldata json, string calldata key) external view returns (bool); |
| 983 | |
| 984 | /// Parses a string of JSON data at `key` and coerces it to `address`. |
| 985 | function parseJsonAddress(string calldata json, string calldata key) external pure returns (address); |
| 986 | |
| 987 | /// Parses a string of JSON data at `key` and coerces it to `address[]`. |
| 988 | function parseJsonAddressArray(string calldata json, string calldata key) external pure returns (address[] memory); |
| 989 | |
| 990 | /// Parses a string of JSON data at `key` and coerces it to `bool`. |
| 991 | function parseJsonBool(string calldata json, string calldata key) external pure returns (bool); |
| 992 | |
| 993 | /// Parses a string of JSON data at `key` and coerces it to `bool[]`. |
| 994 | function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory); |
| 995 | |
| 996 | /// Parses a string of JSON data at `key` and coerces it to `bytes`. |
| 997 | function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory); |
| 998 | |
| 999 | /// Parses a string of JSON data at `key` and coerces it to `bytes32`. |
| 1000 | function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32); |
| 1001 | |
| 1002 | /// Parses a string of JSON data at `key` and coerces it to `bytes32[]`. |
| 1003 | function parseJsonBytes32Array(string calldata json, string calldata key) external pure returns (bytes32[] memory); |
| 1004 | |
| 1005 | /// Parses a string of JSON data at `key` and coerces it to `bytes[]`. |
| 1006 | function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory); |
| 1007 | |
| 1008 | /// Parses a string of JSON data at `key` and coerces it to `int256`. |
| 1009 | function parseJsonInt(string calldata json, string calldata key) external pure returns (int256); |
| 1010 | |
| 1011 | /// Parses a string of JSON data at `key` and coerces it to `int256[]`. |
| 1012 | function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory); |
| 1013 | |
| 1014 | /// Returns an array of all the keys in a JSON object. |
| 1015 | function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys); |
| 1016 | |
| 1017 | /// Parses a string of JSON data at `key` and coerces it to `string`. |
| 1018 | function parseJsonString(string calldata json, string calldata key) external pure returns (string memory); |
| 1019 | |
| 1020 | /// Parses a string of JSON data at `key` and coerces it to `string[]`. |
| 1021 | function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); |
| 1022 | |
| 1023 | /// Parses a string of JSON data at `key` and coerces it to type array corresponding to `typeDescription`. |
| 1024 | function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) |
| 1025 | external |
| 1026 | pure |
| 1027 | returns (bytes memory); |
| 1028 | |
| 1029 | /// Parses a string of JSON data and coerces it to type corresponding to `typeDescription`. |
| 1030 | function parseJsonType(string calldata json, string calldata typeDescription) external pure returns (bytes memory); |
| 1031 | |
| 1032 | /// Parses a string of JSON data at `key` and coerces it to type corresponding to `typeDescription`. |
| 1033 | function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) |
| 1034 | external |
| 1035 | pure |
| 1036 | returns (bytes memory); |
| 1037 | |
| 1038 | /// Parses a string of JSON data at `key` and coerces it to `uint256`. |
| 1039 | function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); |
| 1040 | |
| 1041 | /// Parses a string of JSON data at `key` and coerces it to `uint256[]`. |
| 1042 | function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory); |
| 1043 | |
| 1044 | /// ABI-encodes a JSON object. |
| 1045 | function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData); |
| 1046 | |
| 1047 | /// ABI-encodes a JSON object at `key`. |
| 1048 | function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData); |
| 1049 | |
| 1050 | /// See `serializeJson`. |
| 1051 | function serializeAddress(string calldata objectKey, string calldata valueKey, address value) |
| 1052 | external |
| 1053 | returns (string memory json); |
| 1054 | |
| 1055 | /// See `serializeJson`. |
| 1056 | function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) |
| 1057 | external |
| 1058 | returns (string memory json); |
| 1059 | |
| 1060 | /// See `serializeJson`. |
| 1061 | function serializeBool(string calldata objectKey, string calldata valueKey, bool value) |
| 1062 | external |
| 1063 | returns (string memory json); |
| 1064 | |
| 1065 | /// See `serializeJson`. |
| 1066 | function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) |
| 1067 | external |
| 1068 | returns (string memory json); |
| 1069 | |
| 1070 | /// See `serializeJson`. |
| 1071 | function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) |
| 1072 | external |
| 1073 | returns (string memory json); |
| 1074 | |
| 1075 | /// See `serializeJson`. |
| 1076 | function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) |
| 1077 | external |
| 1078 | returns (string memory json); |
| 1079 | |
| 1080 | /// See `serializeJson`. |
| 1081 | function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) |
| 1082 | external |
| 1083 | returns (string memory json); |
| 1084 | |
| 1085 | /// See `serializeJson`. |
| 1086 | function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) |
| 1087 | external |
| 1088 | returns (string memory json); |
| 1089 | |
| 1090 | /// See `serializeJson`. |
| 1091 | function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) |
| 1092 | external |
| 1093 | returns (string memory json); |
| 1094 | |
| 1095 | /// See `serializeJson`. |
| 1096 | function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) |
| 1097 | external |
| 1098 | returns (string memory json); |
| 1099 | |
| 1100 | /// Serializes a key and value to a JSON object stored in-memory that can be later written to a file. |
| 1101 | /// Returns the stringified version of the specific JSON file up to that moment. |
| 1102 | function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); |
| 1103 | |
| 1104 | /// See `serializeJson`. |
| 1105 | function serializeJsonType(string calldata typeDescription, bytes calldata value) |
| 1106 | external |
| 1107 | pure |
| 1108 | returns (string memory json); |
| 1109 | |
| 1110 | /// See `serializeJson`. |
| 1111 | function serializeJsonType( |
| 1112 | string calldata objectKey, |
| 1113 | string calldata valueKey, |
| 1114 | string calldata typeDescription, |
| 1115 | bytes calldata value |
| 1116 | ) external returns (string memory json); |
| 1117 | |
| 1118 | /// See `serializeJson`. |
| 1119 | function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) |
| 1120 | external |
| 1121 | returns (string memory json); |
| 1122 | |
| 1123 | /// See `serializeJson`. |
| 1124 | function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) |
| 1125 | external |
| 1126 | returns (string memory json); |
| 1127 | |
| 1128 | /// See `serializeJson`. |
| 1129 | function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value) |
| 1130 | external |
| 1131 | returns (string memory json); |
| 1132 | |
| 1133 | /// See `serializeJson`. |
| 1134 | function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) |
| 1135 | external |
| 1136 | returns (string memory json); |
| 1137 | |
| 1138 | /// See `serializeJson`. |
| 1139 | function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) |
| 1140 | external |
| 1141 | returns (string memory json); |
| 1142 | |
| 1143 | /// Write a serialized JSON object to a file. If the file exists, it will be overwritten. |
| 1144 | function writeJson(string calldata json, string calldata path) external; |
| 1145 | |
| 1146 | /// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = <value_key.> |
| 1147 | /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing. |
| 1148 | /// This cheatcode will create new keys if they didn't previously exist. |
| 1149 | function writeJson(string calldata json, string calldata path, string calldata valueKey) external; |
| 1150 | |
| 1151 | /// Checks if `key` exists in a JSON object |
| 1152 | /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. |
| 1153 | function keyExists(string calldata json, string calldata key) external view returns (bool); |
| 1154 | |
| 1155 | // ======== Scripting ======== |
| 1156 | |
| 1157 | /// Attach an EIP-4844 blob to the next call |
| 1158 | function attachBlob(bytes calldata blob) external; |
| 1159 | |
| 1160 | /// Designate the next call as an EIP-7702 transaction |
| 1161 | function attachDelegation(SignedDelegation calldata signedDelegation) external; |
| 1162 | |
| 1163 | /// Designate the next call as an EIP-7702 transaction, with optional cross-chain validity. |
| 1164 | function attachDelegation(SignedDelegation calldata signedDelegation, bool crossChain) external; |
| 1165 | |
| 1166 | /// Takes a signed transaction and broadcasts it to the network. |
| 1167 | function broadcastRawTransaction(bytes calldata data) external; |
| 1168 | |
| 1169 | /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain. |
| 1170 | /// Broadcasting address is determined by checking the following in order: |
| 1171 | /// 1. If `--sender` argument was provided, that address is used. |
| 1172 | /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. |
| 1173 | /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. |
| 1174 | function broadcast() external; |
| 1175 | |
| 1176 | /// Has the next call (at this call depth only) create a transaction with the address provided |
| 1177 | /// as the sender that can later be signed and sent onchain. |
| 1178 | function broadcast(address signer) external; |
| 1179 | |
| 1180 | /// Has the next call (at this call depth only) create a transaction with the private key |
| 1181 | /// provided as the sender that can later be signed and sent onchain. |
| 1182 | function broadcast(uint256 privateKey) external; |
| 1183 | |
| 1184 | /// Returns addresses of available unlocked wallets in the script environment. |
| 1185 | function getWallets() external view returns (address[] memory wallets); |
| 1186 | |
| 1187 | /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction |
| 1188 | function signAndAttachDelegation(address implementation, uint256 privateKey) |
| 1189 | external |
| 1190 | returns (SignedDelegation memory signedDelegation); |
| 1191 | |
| 1192 | /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction for specific nonce |
| 1193 | function signAndAttachDelegation(address implementation, uint256 privateKey, uint64 nonce) |
| 1194 | external |
| 1195 | returns (SignedDelegation memory signedDelegation); |
| 1196 | |
| 1197 | /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction, with optional cross-chain validity. |
| 1198 | function signAndAttachDelegation(address implementation, uint256 privateKey, bool crossChain) |
| 1199 | external |
| 1200 | returns (SignedDelegation memory signedDelegation); |
| 1201 | |
| 1202 | /// Sign an EIP-7702 authorization for delegation |
| 1203 | function signDelegation(address implementation, uint256 privateKey) |
| 1204 | external |
| 1205 | returns (SignedDelegation memory signedDelegation); |
| 1206 | |
| 1207 | /// Sign an EIP-7702 authorization for delegation for specific nonce |
| 1208 | function signDelegation(address implementation, uint256 privateKey, uint64 nonce) |
| 1209 | external |
| 1210 | returns (SignedDelegation memory signedDelegation); |
| 1211 | |
| 1212 | /// Sign an EIP-7702 authorization for delegation, with optional cross-chain validity. |
| 1213 | function signDelegation(address implementation, uint256 privateKey, bool crossChain) |
| 1214 | external |
| 1215 | returns (SignedDelegation memory signedDelegation); |
| 1216 | |
| 1217 | /// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain. |
| 1218 | /// Broadcasting address is determined by checking the following in order: |
| 1219 | /// 1. If `--sender` argument was provided, that address is used. |
| 1220 | /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. |
| 1221 | /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. |
| 1222 | function startBroadcast() external; |
| 1223 | |
| 1224 | /// Has all subsequent calls (at this call depth only) create transactions with the address |
| 1225 | /// provided that can later be signed and sent onchain. |
| 1226 | function startBroadcast(address signer) external; |
| 1227 | |
| 1228 | /// Has all subsequent calls (at this call depth only) create transactions with the private key |
| 1229 | /// provided that can later be signed and sent onchain. |
| 1230 | function startBroadcast(uint256 privateKey) external; |
| 1231 | |
| 1232 | /// Stops collecting onchain transactions. |
| 1233 | function stopBroadcast() external; |
| 1234 | |
| 1235 | // ======== String ======== |
| 1236 | |
| 1237 | /// Returns true if `search` is found in `subject`, false otherwise. |
| 1238 | function contains(string calldata subject, string calldata search) external pure returns (bool result); |
| 1239 | |
| 1240 | /// Returns the index of the first occurrence of a `key` in an `input` string. |
| 1241 | /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `key` is not found. |
| 1242 | /// Returns 0 in case of an empty `key`. |
| 1243 | function indexOf(string calldata input, string calldata key) external pure returns (uint256); |
| 1244 | |
| 1245 | /// Parses the given `string` into an `address`. |
| 1246 | function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue); |
| 1247 | |
| 1248 | /// Parses the given `string` into a `bool`. |
| 1249 | function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue); |
| 1250 | |
| 1251 | /// Parses the given `string` into `bytes`. |
| 1252 | function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue); |
| 1253 | |
| 1254 | /// Parses the given `string` into a `bytes32`. |
| 1255 | function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue); |
| 1256 | |
| 1257 | /// Parses the given `string` into a `int256`. |
| 1258 | function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue); |
| 1259 | |
| 1260 | /// Parses the given `string` into a `uint256`. |
| 1261 | function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue); |
| 1262 | |
| 1263 | /// Replaces occurrences of `from` in the given `string` with `to`. |
| 1264 | function replace(string calldata input, string calldata from, string calldata to) |
| 1265 | external |
| 1266 | pure |
| 1267 | returns (string memory output); |
| 1268 | |
| 1269 | /// Splits the given `string` into an array of strings divided by the `delimiter`. |
| 1270 | function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs); |
| 1271 | |
| 1272 | /// Converts the given `string` value to Lowercase. |
| 1273 | function toLowercase(string calldata input) external pure returns (string memory output); |
| 1274 | |
| 1275 | /// Converts the given value to a `string`. |
| 1276 | function toString(address value) external pure returns (string memory stringifiedValue); |
| 1277 | |
| 1278 | /// Converts the given value to a `string`. |
| 1279 | function toString(bytes calldata value) external pure returns (string memory stringifiedValue); |
| 1280 | |
| 1281 | /// Converts the given value to a `string`. |
| 1282 | function toString(bytes32 value) external pure returns (string memory stringifiedValue); |
| 1283 | |
| 1284 | /// Converts the given value to a `string`. |
| 1285 | function toString(bool value) external pure returns (string memory stringifiedValue); |
| 1286 | |
| 1287 | /// Converts the given value to a `string`. |
| 1288 | function toString(uint256 value) external pure returns (string memory stringifiedValue); |
| 1289 | |
| 1290 | /// Converts the given value to a `string`. |
| 1291 | function toString(int256 value) external pure returns (string memory stringifiedValue); |
| 1292 | |
| 1293 | /// Converts the given `string` value to Uppercase. |
| 1294 | function toUppercase(string calldata input) external pure returns (string memory output); |
| 1295 | |
| 1296 | /// Trims leading and trailing whitespace from the given `string` value. |
| 1297 | function trim(string calldata input) external pure returns (string memory output); |
| 1298 | |
| 1299 | // ======== Testing ======== |
| 1300 | |
| 1301 | /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1302 | /// Formats values with decimals in failure message. |
| 1303 | function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure; |
| 1304 | |
| 1305 | /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1306 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1307 | function assertApproxEqAbsDecimal( |
| 1308 | uint256 left, |
| 1309 | uint256 right, |
| 1310 | uint256 maxDelta, |
| 1311 | uint256 decimals, |
| 1312 | string calldata error |
| 1313 | ) external pure; |
| 1314 | |
| 1315 | /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1316 | /// Formats values with decimals in failure message. |
| 1317 | function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure; |
| 1318 | |
| 1319 | /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1320 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1321 | function assertApproxEqAbsDecimal( |
| 1322 | int256 left, |
| 1323 | int256 right, |
| 1324 | uint256 maxDelta, |
| 1325 | uint256 decimals, |
| 1326 | string calldata error |
| 1327 | ) external pure; |
| 1328 | |
| 1329 | /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1330 | function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure; |
| 1331 | |
| 1332 | /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1333 | /// Includes error message into revert string on failure. |
| 1334 | function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure; |
| 1335 | |
| 1336 | /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1337 | function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure; |
| 1338 | |
| 1339 | /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. |
| 1340 | /// Includes error message into revert string on failure. |
| 1341 | function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure; |
| 1342 | |
| 1343 | /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1344 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1345 | /// Formats values with decimals in failure message. |
| 1346 | function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals) |
| 1347 | external |
| 1348 | pure; |
| 1349 | |
| 1350 | /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1351 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1352 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1353 | function assertApproxEqRelDecimal( |
| 1354 | uint256 left, |
| 1355 | uint256 right, |
| 1356 | uint256 maxPercentDelta, |
| 1357 | uint256 decimals, |
| 1358 | string calldata error |
| 1359 | ) external pure; |
| 1360 | |
| 1361 | /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1362 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1363 | /// Formats values with decimals in failure message. |
| 1364 | function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals) |
| 1365 | external |
| 1366 | pure; |
| 1367 | |
| 1368 | /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1369 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1370 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1371 | function assertApproxEqRelDecimal( |
| 1372 | int256 left, |
| 1373 | int256 right, |
| 1374 | uint256 maxPercentDelta, |
| 1375 | uint256 decimals, |
| 1376 | string calldata error |
| 1377 | ) external pure; |
| 1378 | |
| 1379 | /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1380 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1381 | function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure; |
| 1382 | |
| 1383 | /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1384 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1385 | /// Includes error message into revert string on failure. |
| 1386 | function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error) |
| 1387 | external |
| 1388 | pure; |
| 1389 | |
| 1390 | /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1391 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1392 | function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure; |
| 1393 | |
| 1394 | /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. |
| 1395 | /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% |
| 1396 | /// Includes error message into revert string on failure. |
| 1397 | function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error) external pure; |
| 1398 | |
| 1399 | /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. |
| 1400 | function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1401 | |
| 1402 | /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. |
| 1403 | /// Includes error message into revert string on failure. |
| 1404 | function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1405 | |
| 1406 | /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. |
| 1407 | function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1408 | |
| 1409 | /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. |
| 1410 | /// Includes error message into revert string on failure. |
| 1411 | function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1412 | |
| 1413 | /// Asserts that two `bool` values are equal. |
| 1414 | function assertEq(bool left, bool right) external pure; |
| 1415 | |
| 1416 | /// Asserts that two `bool` values are equal and includes error message into revert string on failure. |
| 1417 | function assertEq(bool left, bool right, string calldata error) external pure; |
| 1418 | |
| 1419 | /// Asserts that two `string` values are equal. |
| 1420 | function assertEq(string calldata left, string calldata right) external pure; |
| 1421 | |
| 1422 | /// Asserts that two `string` values are equal and includes error message into revert string on failure. |
| 1423 | function assertEq(string calldata left, string calldata right, string calldata error) external pure; |
| 1424 | |
| 1425 | /// Asserts that two `bytes` values are equal. |
| 1426 | function assertEq(bytes calldata left, bytes calldata right) external pure; |
| 1427 | |
| 1428 | /// Asserts that two `bytes` values are equal and includes error message into revert string on failure. |
| 1429 | function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure; |
| 1430 | |
| 1431 | /// Asserts that two arrays of `bool` values are equal. |
| 1432 | function assertEq(bool[] calldata left, bool[] calldata right) external pure; |
| 1433 | |
| 1434 | /// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure. |
| 1435 | function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; |
| 1436 | |
| 1437 | /// Asserts that two arrays of `uint256 values are equal. |
| 1438 | function assertEq(uint256[] calldata left, uint256[] calldata right) external pure; |
| 1439 | |
| 1440 | /// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure. |
| 1441 | function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; |
| 1442 | |
| 1443 | /// Asserts that two arrays of `int256` values are equal. |
| 1444 | function assertEq(int256[] calldata left, int256[] calldata right) external pure; |
| 1445 | |
| 1446 | /// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure. |
| 1447 | function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; |
| 1448 | |
| 1449 | /// Asserts that two `uint256` values are equal. |
| 1450 | function assertEq(uint256 left, uint256 right) external pure; |
| 1451 | |
| 1452 | /// Asserts that two arrays of `address` values are equal. |
| 1453 | function assertEq(address[] calldata left, address[] calldata right) external pure; |
| 1454 | |
| 1455 | /// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure. |
| 1456 | function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure; |
| 1457 | |
| 1458 | /// Asserts that two arrays of `bytes32` values are equal. |
| 1459 | function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure; |
| 1460 | |
| 1461 | /// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure. |
| 1462 | function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; |
| 1463 | |
| 1464 | /// Asserts that two arrays of `string` values are equal. |
| 1465 | function assertEq(string[] calldata left, string[] calldata right) external pure; |
| 1466 | |
| 1467 | /// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure. |
| 1468 | function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure; |
| 1469 | |
| 1470 | /// Asserts that two arrays of `bytes` values are equal. |
| 1471 | function assertEq(bytes[] calldata left, bytes[] calldata right) external pure; |
| 1472 | |
| 1473 | /// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure. |
| 1474 | function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; |
| 1475 | |
| 1476 | /// Asserts that two `uint256` values are equal and includes error message into revert string on failure. |
| 1477 | function assertEq(uint256 left, uint256 right, string calldata error) external pure; |
| 1478 | |
| 1479 | /// Asserts that two `int256` values are equal. |
| 1480 | function assertEq(int256 left, int256 right) external pure; |
| 1481 | |
| 1482 | /// Asserts that two `int256` values are equal and includes error message into revert string on failure. |
| 1483 | function assertEq(int256 left, int256 right, string calldata error) external pure; |
| 1484 | |
| 1485 | /// Asserts that two `address` values are equal. |
| 1486 | function assertEq(address left, address right) external pure; |
| 1487 | |
| 1488 | /// Asserts that two `address` values are equal and includes error message into revert string on failure. |
| 1489 | function assertEq(address left, address right, string calldata error) external pure; |
| 1490 | |
| 1491 | /// Asserts that two `bytes32` values are equal. |
| 1492 | function assertEq(bytes32 left, bytes32 right) external pure; |
| 1493 | |
| 1494 | /// Asserts that two `bytes32` values are equal and includes error message into revert string on failure. |
| 1495 | function assertEq(bytes32 left, bytes32 right, string calldata error) external pure; |
| 1496 | |
| 1497 | /// Asserts that the given condition is false. |
| 1498 | function assertFalse(bool condition) external pure; |
| 1499 | |
| 1500 | /// Asserts that the given condition is false and includes error message into revert string on failure. |
| 1501 | function assertFalse(bool condition, string calldata error) external pure; |
| 1502 | |
| 1503 | /// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
| 1504 | /// Formats values with decimals in failure message. |
| 1505 | function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1506 | |
| 1507 | /// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
| 1508 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1509 | function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1510 | |
| 1511 | /// Compares two `int256` values. Expects first value to be greater than or equal to second. |
| 1512 | /// Formats values with decimals in failure message. |
| 1513 | function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1514 | |
| 1515 | /// Compares two `int256` values. Expects first value to be greater than or equal to second. |
| 1516 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1517 | function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1518 | |
| 1519 | /// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
| 1520 | function assertGe(uint256 left, uint256 right) external pure; |
| 1521 | |
| 1522 | /// Compares two `uint256` values. Expects first value to be greater than or equal to second. |
| 1523 | /// Includes error message into revert string on failure. |
| 1524 | function assertGe(uint256 left, uint256 right, string calldata error) external pure; |
| 1525 | |
| 1526 | /// Compares two `int256` values. Expects first value to be greater than or equal to second. |
| 1527 | function assertGe(int256 left, int256 right) external pure; |
| 1528 | |
| 1529 | /// Compares two `int256` values. Expects first value to be greater than or equal to second. |
| 1530 | /// Includes error message into revert string on failure. |
| 1531 | function assertGe(int256 left, int256 right, string calldata error) external pure; |
| 1532 | |
| 1533 | /// Compares two `uint256` values. Expects first value to be greater than second. |
| 1534 | /// Formats values with decimals in failure message. |
| 1535 | function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1536 | |
| 1537 | /// Compares two `uint256` values. Expects first value to be greater than second. |
| 1538 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1539 | function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1540 | |
| 1541 | /// Compares two `int256` values. Expects first value to be greater than second. |
| 1542 | /// Formats values with decimals in failure message. |
| 1543 | function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1544 | |
| 1545 | /// Compares two `int256` values. Expects first value to be greater than second. |
| 1546 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1547 | function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1548 | |
| 1549 | /// Compares two `uint256` values. Expects first value to be greater than second. |
| 1550 | function assertGt(uint256 left, uint256 right) external pure; |
| 1551 | |
| 1552 | /// Compares two `uint256` values. Expects first value to be greater than second. |
| 1553 | /// Includes error message into revert string on failure. |
| 1554 | function assertGt(uint256 left, uint256 right, string calldata error) external pure; |
| 1555 | |
| 1556 | /// Compares two `int256` values. Expects first value to be greater than second. |
| 1557 | function assertGt(int256 left, int256 right) external pure; |
| 1558 | |
| 1559 | /// Compares two `int256` values. Expects first value to be greater than second. |
| 1560 | /// Includes error message into revert string on failure. |
| 1561 | function assertGt(int256 left, int256 right, string calldata error) external pure; |
| 1562 | |
| 1563 | /// Compares two `uint256` values. Expects first value to be less than or equal to second. |
| 1564 | /// Formats values with decimals in failure message. |
| 1565 | function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1566 | |
| 1567 | /// Compares two `uint256` values. Expects first value to be less than or equal to second. |
| 1568 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1569 | function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1570 | |
| 1571 | /// Compares two `int256` values. Expects first value to be less than or equal to second. |
| 1572 | /// Formats values with decimals in failure message. |
| 1573 | function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1574 | |
| 1575 | /// Compares two `int256` values. Expects first value to be less than or equal to second. |
| 1576 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1577 | function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1578 | |
| 1579 | /// Compares two `uint256` values. Expects first value to be less than or equal to second. |
| 1580 | function assertLe(uint256 left, uint256 right) external pure; |
| 1581 | |
| 1582 | /// Compares two `uint256` values. Expects first value to be less than or equal to second. |
| 1583 | /// Includes error message into revert string on failure. |
| 1584 | function assertLe(uint256 left, uint256 right, string calldata error) external pure; |
| 1585 | |
| 1586 | /// Compares two `int256` values. Expects first value to be less than or equal to second. |
| 1587 | function assertLe(int256 left, int256 right) external pure; |
| 1588 | |
| 1589 | /// Compares two `int256` values. Expects first value to be less than or equal to second. |
| 1590 | /// Includes error message into revert string on failure. |
| 1591 | function assertLe(int256 left, int256 right, string calldata error) external pure; |
| 1592 | |
| 1593 | /// Compares two `uint256` values. Expects first value to be less than second. |
| 1594 | /// Formats values with decimals in failure message. |
| 1595 | function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1596 | |
| 1597 | /// Compares two `uint256` values. Expects first value to be less than second. |
| 1598 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1599 | function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1600 | |
| 1601 | /// Compares two `int256` values. Expects first value to be less than second. |
| 1602 | /// Formats values with decimals in failure message. |
| 1603 | function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1604 | |
| 1605 | /// Compares two `int256` values. Expects first value to be less than second. |
| 1606 | /// Formats values with decimals in failure message. Includes error message into revert string on failure. |
| 1607 | function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1608 | |
| 1609 | /// Compares two `uint256` values. Expects first value to be less than second. |
| 1610 | function assertLt(uint256 left, uint256 right) external pure; |
| 1611 | |
| 1612 | /// Compares two `uint256` values. Expects first value to be less than second. |
| 1613 | /// Includes error message into revert string on failure. |
| 1614 | function assertLt(uint256 left, uint256 right, string calldata error) external pure; |
| 1615 | |
| 1616 | /// Compares two `int256` values. Expects first value to be less than second. |
| 1617 | function assertLt(int256 left, int256 right) external pure; |
| 1618 | |
| 1619 | /// Compares two `int256` values. Expects first value to be less than second. |
| 1620 | /// Includes error message into revert string on failure. |
| 1621 | function assertLt(int256 left, int256 right, string calldata error) external pure; |
| 1622 | |
| 1623 | /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. |
| 1624 | function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; |
| 1625 | |
| 1626 | /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. |
| 1627 | /// Includes error message into revert string on failure. |
| 1628 | function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; |
| 1629 | |
| 1630 | /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. |
| 1631 | function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure; |
| 1632 | |
| 1633 | /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. |
| 1634 | /// Includes error message into revert string on failure. |
| 1635 | function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; |
| 1636 | |
| 1637 | /// Asserts that two `bool` values are not equal. |
| 1638 | function assertNotEq(bool left, bool right) external pure; |
| 1639 | |
| 1640 | /// Asserts that two `bool` values are not equal and includes error message into revert string on failure. |
| 1641 | function assertNotEq(bool left, bool right, string calldata error) external pure; |
| 1642 | |
| 1643 | /// Asserts that two `string` values are not equal. |
| 1644 | function assertNotEq(string calldata left, string calldata right) external pure; |
| 1645 | |
| 1646 | /// Asserts that two `string` values are not equal and includes error message into revert string on failure. |
| 1647 | function assertNotEq(string calldata left, string calldata right, string calldata error) external pure; |
| 1648 | |
| 1649 | /// Asserts that two `bytes` values are not equal. |
| 1650 | function assertNotEq(bytes calldata left, bytes calldata right) external pure; |
| 1651 | |
| 1652 | /// Asserts that two `bytes` values are not equal and includes error message into revert string on failure. |
| 1653 | function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure; |
| 1654 | |
| 1655 | /// Asserts that two arrays of `bool` values are not equal. |
| 1656 | function assertNotEq(bool[] calldata left, bool[] calldata right) external pure; |
| 1657 | |
| 1658 | /// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure. |
| 1659 | function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; |
| 1660 | |
| 1661 | /// Asserts that two arrays of `uint256` values are not equal. |
| 1662 | function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure; |
| 1663 | |
| 1664 | /// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure. |
| 1665 | function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; |
| 1666 | |
| 1667 | /// Asserts that two arrays of `int256` values are not equal. |
| 1668 | function assertNotEq(int256[] calldata left, int256[] calldata right) external pure; |
| 1669 | |
| 1670 | /// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure. |
| 1671 | function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; |
| 1672 | |
| 1673 | /// Asserts that two `uint256` values are not equal. |
| 1674 | function assertNotEq(uint256 left, uint256 right) external pure; |
| 1675 | |
| 1676 | /// Asserts that two arrays of `address` values are not equal. |
| 1677 | function assertNotEq(address[] calldata left, address[] calldata right) external pure; |
| 1678 | |
| 1679 | /// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure. |
| 1680 | function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure; |
| 1681 | |
| 1682 | /// Asserts that two arrays of `bytes32` values are not equal. |
| 1683 | function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure; |
| 1684 | |
| 1685 | /// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure. |
| 1686 | function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; |
| 1687 | |
| 1688 | /// Asserts that two arrays of `string` values are not equal. |
| 1689 | function assertNotEq(string[] calldata left, string[] calldata right) external pure; |
| 1690 | |
| 1691 | /// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure. |
| 1692 | function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure; |
| 1693 | |
| 1694 | /// Asserts that two arrays of `bytes` values are not equal. |
| 1695 | function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure; |
| 1696 | |
| 1697 | /// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure. |
| 1698 | function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; |
| 1699 | |
| 1700 | /// Asserts that two `uint256` values are not equal and includes error message into revert string on failure. |
| 1701 | function assertNotEq(uint256 left, uint256 right, string calldata error) external pure; |
| 1702 | |
| 1703 | /// Asserts that two `int256` values are not equal. |
| 1704 | function assertNotEq(int256 left, int256 right) external pure; |
| 1705 | |
| 1706 | /// Asserts that two `int256` values are not equal and includes error message into revert string on failure. |
| 1707 | function assertNotEq(int256 left, int256 right, string calldata error) external pure; |
| 1708 | |
| 1709 | /// Asserts that two `address` values are not equal. |
| 1710 | function assertNotEq(address left, address right) external pure; |
| 1711 | |
| 1712 | /// Asserts that two `address` values are not equal and includes error message into revert string on failure. |
| 1713 | function assertNotEq(address left, address right, string calldata error) external pure; |
| 1714 | |
| 1715 | /// Asserts that two `bytes32` values are not equal. |
| 1716 | function assertNotEq(bytes32 left, bytes32 right) external pure; |
| 1717 | |
| 1718 | /// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure. |
| 1719 | function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure; |
| 1720 | |
| 1721 | /// Asserts that the given condition is true. |
| 1722 | function assertTrue(bool condition) external pure; |
| 1723 | |
| 1724 | /// Asserts that the given condition is true and includes error message into revert string on failure. |
| 1725 | function assertTrue(bool condition, string calldata error) external pure; |
| 1726 | |
| 1727 | /// If the condition is false, discard this run's fuzz inputs and generate new ones. |
| 1728 | function assume(bool condition) external pure; |
| 1729 | |
| 1730 | /// Discard this run's fuzz inputs and generate new ones if next call reverted. |
| 1731 | function assumeNoRevert() external pure; |
| 1732 | |
| 1733 | /// Discard this run's fuzz inputs and generate new ones if next call reverts with the potential revert parameters. |
| 1734 | function assumeNoRevert(PotentialRevert calldata potentialRevert) external pure; |
| 1735 | |
| 1736 | /// Discard this run's fuzz inputs and generate new ones if next call reverts with the any of the potential revert parameters. |
| 1737 | function assumeNoRevert(PotentialRevert[] calldata potentialReverts) external pure; |
| 1738 | |
| 1739 | /// Writes a breakpoint to jump to in the debugger. |
| 1740 | function breakpoint(string calldata char) external pure; |
| 1741 | |
| 1742 | /// Writes a conditional breakpoint to jump to in the debugger. |
| 1743 | function breakpoint(string calldata char, bool value) external pure; |
| 1744 | |
| 1745 | /// Returns true if the current Foundry version is greater than or equal to the given version. |
| 1746 | /// The given version string must be in the format `major.minor.patch`. |
| 1747 | /// This is equivalent to `foundryVersionCmp(version) >= 0`. |
| 1748 | function foundryVersionAtLeast(string calldata version) external view returns (bool); |
| 1749 | |
| 1750 | /// Compares the current Foundry version with the given version string. |
| 1751 | /// The given version string must be in the format `major.minor.patch`. |
| 1752 | /// Returns: |
| 1753 | /// -1 if current Foundry version is less than the given version |
| 1754 | /// 0 if current Foundry version equals the given version |
| 1755 | /// 1 if current Foundry version is greater than the given version |
| 1756 | /// This result can then be used with a comparison operator against `0`. |
| 1757 | /// For example, to check if the current Foundry version is greater than or equal to `1.0.0`: |
| 1758 | /// `if (foundryVersionCmp("1.0.0") >= 0) { ... }` |
| 1759 | function foundryVersionCmp(string calldata version) external view returns (int256); |
| 1760 | |
| 1761 | /// Returns a Chain struct for specific alias |
| 1762 | function getChain(string calldata chainAlias) external view returns (Chain memory chain); |
| 1763 | |
| 1764 | /// Returns a Chain struct for specific chainId |
| 1765 | function getChain(uint256 chainId) external view returns (Chain memory chain); |
| 1766 | |
| 1767 | /// Returns the Foundry version. |
| 1768 | /// Format: <cargo_version>-<tag>+<git_sha_short>.<unix_build_timestamp>.<profile> |
| 1769 | /// Sample output: 0.3.0-nightly+3cb96bde9b.1737036656.debug |
| 1770 | /// Note: Build timestamps may vary slightly across platforms due to separate CI jobs. |
| 1771 | /// For reliable version comparisons, use UNIX format (e.g., >= 1700000000) |
| 1772 | /// to compare timestamps while ignoring minor time differences. |
| 1773 | function getFoundryVersion() external view returns (string memory version); |
| 1774 | |
| 1775 | /// Returns the RPC url for the given alias. |
| 1776 | function rpcUrl(string calldata rpcAlias) external view returns (string memory json); |
| 1777 | |
| 1778 | /// Returns all rpc urls and their aliases as structs. |
| 1779 | function rpcUrlStructs() external view returns (Rpc[] memory urls); |
| 1780 | |
| 1781 | /// Returns all rpc urls and their aliases `[alias, url][]`. |
| 1782 | function rpcUrls() external view returns (string[2][] memory urls); |
| 1783 | |
| 1784 | /// Suspends execution of the main thread for `duration` milliseconds. |
| 1785 | function sleep(uint256 duration) external; |
| 1786 | |
| 1787 | // ======== Toml ======== |
| 1788 | |
| 1789 | /// Checks if `key` exists in a TOML table. |
| 1790 | function keyExistsToml(string calldata toml, string calldata key) external view returns (bool); |
| 1791 | |
| 1792 | /// Parses a string of TOML data at `key` and coerces it to `address`. |
| 1793 | function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address); |
| 1794 | |
| 1795 | /// Parses a string of TOML data at `key` and coerces it to `address[]`. |
| 1796 | function parseTomlAddressArray(string calldata toml, string calldata key) external pure returns (address[] memory); |
| 1797 | |
| 1798 | /// Parses a string of TOML data at `key` and coerces it to `bool`. |
| 1799 | function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool); |
| 1800 | |
| 1801 | /// Parses a string of TOML data at `key` and coerces it to `bool[]`. |
| 1802 | function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory); |
| 1803 | |
| 1804 | /// Parses a string of TOML data at `key` and coerces it to `bytes`. |
| 1805 | function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory); |
| 1806 | |
| 1807 | /// Parses a string of TOML data at `key` and coerces it to `bytes32`. |
| 1808 | function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32); |
| 1809 | |
| 1810 | /// Parses a string of TOML data at `key` and coerces it to `bytes32[]`. |
| 1811 | function parseTomlBytes32Array(string calldata toml, string calldata key) external pure returns (bytes32[] memory); |
| 1812 | |
| 1813 | /// Parses a string of TOML data at `key` and coerces it to `bytes[]`. |
| 1814 | function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory); |
| 1815 | |
| 1816 | /// Parses a string of TOML data at `key` and coerces it to `int256`. |
| 1817 | function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256); |
| 1818 | |
| 1819 | /// Parses a string of TOML data at `key` and coerces it to `int256[]`. |
| 1820 | function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory); |
| 1821 | |
| 1822 | /// Returns an array of all the keys in a TOML table. |
| 1823 | function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys); |
| 1824 | |
| 1825 | /// Parses a string of TOML data at `key` and coerces it to `string`. |
| 1826 | function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory); |
| 1827 | |
| 1828 | /// Parses a string of TOML data at `key` and coerces it to `string[]`. |
| 1829 | function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory); |
| 1830 | |
| 1831 | /// Parses a string of TOML data at `key` and coerces it to type array corresponding to `typeDescription`. |
| 1832 | function parseTomlTypeArray(string calldata toml, string calldata key, string calldata typeDescription) |
| 1833 | external |
| 1834 | pure |
| 1835 | returns (bytes memory); |
| 1836 | |
| 1837 | /// Parses a string of TOML data and coerces it to type corresponding to `typeDescription`. |
| 1838 | function parseTomlType(string calldata toml, string calldata typeDescription) external pure returns (bytes memory); |
| 1839 | |
| 1840 | /// Parses a string of TOML data at `key` and coerces it to type corresponding to `typeDescription`. |
| 1841 | function parseTomlType(string calldata toml, string calldata key, string calldata typeDescription) |
| 1842 | external |
| 1843 | pure |
| 1844 | returns (bytes memory); |
| 1845 | |
| 1846 | /// Parses a string of TOML data at `key` and coerces it to `uint256`. |
| 1847 | function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256); |
| 1848 | |
| 1849 | /// Parses a string of TOML data at `key` and coerces it to `uint256[]`. |
| 1850 | function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory); |
| 1851 | |
| 1852 | /// ABI-encodes a TOML table. |
| 1853 | function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData); |
| 1854 | |
| 1855 | /// ABI-encodes a TOML table at `key`. |
| 1856 | function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData); |
| 1857 | |
| 1858 | /// Takes serialized JSON, converts to TOML and write a serialized TOML to a file. |
| 1859 | function writeToml(string calldata json, string calldata path) external; |
| 1860 | |
| 1861 | /// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key = <value_key.> |
| 1862 | /// This is useful to replace a specific value of a TOML file, without having to parse the entire thing. |
| 1863 | /// This cheatcode will create new keys if they didn't previously exist. |
| 1864 | function writeToml(string calldata json, string calldata path, string calldata valueKey) external; |
| 1865 | |
| 1866 | // ======== Utilities ======== |
| 1867 | |
| 1868 | /// Returns an uint256 value bounded in given range and different from the current one. |
| 1869 | function bound(uint256 current, uint256 min, uint256 max) external view returns (uint256); |
| 1870 | |
| 1871 | /// Returns an int256 value bounded in given range and different from the current one. |
| 1872 | function bound(int256 current, int256 min, int256 max) external view returns (int256); |
| 1873 | |
| 1874 | /// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer. |
| 1875 | function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) external pure returns (address); |
| 1876 | |
| 1877 | /// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer. |
| 1878 | function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address); |
| 1879 | |
| 1880 | /// Compute the address a contract will be deployed at for a given deployer address and nonce. |
| 1881 | function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address); |
| 1882 | |
| 1883 | /// Utility cheatcode to copy storage of `from` contract to another `to` contract. |
| 1884 | function copyStorage(address from, address to) external; |
| 1885 | |
| 1886 | /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data. |
| 1887 | /// Supports 2 different inputs: |
| 1888 | /// 1. Name of the type (i.e. "PermitSingle"): |
| 1889 | /// * requires previous binding generation with `forge bind-json`. |
| 1890 | /// * bindings will be retrieved from the path configured in `foundry.toml`. |
| 1891 | /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)"). |
| 1892 | /// * Note: the cheatcode will use the canonical type even if the input is malformated |
| 1893 | /// with the wrong order of elements or with extra whitespaces. |
| 1894 | function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData) |
| 1895 | external |
| 1896 | pure |
| 1897 | returns (bytes32 typeHash); |
| 1898 | |
| 1899 | /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data. |
| 1900 | /// Requires previous binding generation with `forge bind-json`. |
| 1901 | /// Params: |
| 1902 | /// * `bindingsPath`: path where the output of `forge bind-json` is stored. |
| 1903 | /// * `typeName`: Name of the type (i.e. "PermitSingle"). |
| 1904 | /// * `abiEncodedData`: ABI-encoded data for the struct that is being hashed. |
| 1905 | function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData) |
| 1906 | external |
| 1907 | pure |
| 1908 | returns (bytes32 typeHash); |
| 1909 | |
| 1910 | /// Generates the hash of the canonical EIP-712 type representation. |
| 1911 | /// Supports 2 different inputs: |
| 1912 | /// 1. Name of the type (i.e. "Transaction"): |
| 1913 | /// * requires previous binding generation with `forge bind-json`. |
| 1914 | /// * bindings will be retrieved from the path configured in `foundry.toml`. |
| 1915 | /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)"). |
| 1916 | /// * Note: the cheatcode will output the canonical type even if the input is malformated |
| 1917 | /// with the wrong order of elements or with extra whitespaces. |
| 1918 | function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash); |
| 1919 | |
| 1920 | /// Generates the hash of the canonical EIP-712 type representation. |
| 1921 | /// Requires previous binding generation with `forge bind-json`. |
| 1922 | /// Params: |
| 1923 | /// * `bindingsPath`: path where the output of `forge bind-json` is stored. |
| 1924 | /// * `typeName`: Name of the type (i.e. "Transaction"). |
| 1925 | function eip712HashType(string calldata bindingsPath, string calldata typeName) |
| 1926 | external |
| 1927 | pure |
| 1928 | returns (bytes32 typeHash); |
| 1929 | |
| 1930 | /// Generates a ready-to-sign digest of human-readable typed data following the EIP-712 standard. |
| 1931 | function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest); |
| 1932 | |
| 1933 | /// Returns ENS namehash for provided string. |
| 1934 | function ensNamehash(string calldata name) external pure returns (bytes32); |
| 1935 | |
| 1936 | /// RLP decodes an RLP payload into a list of bytes. |
| 1937 | function fromRlp(bytes calldata rlp) external pure returns (bytes[] memory data); |
| 1938 | |
| 1939 | /// Gets the label for the specified address. |
| 1940 | function getLabel(address account) external view returns (string memory currentLabel); |
| 1941 | |
| 1942 | /// Labels an address in call traces. |
| 1943 | function label(address account, string calldata newLabel) external; |
| 1944 | |
| 1945 | /// Pauses collection of call traces. Useful in cases when you want to skip tracing of |
| 1946 | /// complex calls which are not useful for debugging. |
| 1947 | function pauseTracing() external view; |
| 1948 | |
| 1949 | /// Returns a random `address`. |
| 1950 | function randomAddress() external view returns (address); |
| 1951 | |
| 1952 | /// Returns a random `bool`. |
| 1953 | function randomBool() external view returns (bool); |
| 1954 | |
| 1955 | /// Returns a random byte array value of the given length. |
| 1956 | function randomBytes(uint256 len) external view returns (bytes memory); |
| 1957 | |
| 1958 | /// Returns a random fixed-size byte array of length 4. |
| 1959 | function randomBytes4() external view returns (bytes4); |
| 1960 | |
| 1961 | /// Returns a random fixed-size byte array of length 8. |
| 1962 | function randomBytes8() external view returns (bytes8); |
| 1963 | |
| 1964 | /// Returns a random `int256` value. |
| 1965 | function randomInt() external view returns (int256); |
| 1966 | |
| 1967 | /// Returns a random `int256` value of given bits. |
| 1968 | function randomInt(uint256 bits) external view returns (int256); |
| 1969 | |
| 1970 | /// Returns a random uint256 value. |
| 1971 | function randomUint() external view returns (uint256); |
| 1972 | |
| 1973 | /// Returns random uint256 value between the provided range (=min..=max). |
| 1974 | function randomUint(uint256 min, uint256 max) external view returns (uint256); |
| 1975 | |
| 1976 | /// Returns a random `uint256` value of given bits. |
| 1977 | function randomUint(uint256 bits) external view returns (uint256); |
| 1978 | |
| 1979 | /// Unpauses collection of call traces. |
| 1980 | function resumeTracing() external view; |
| 1981 | |
| 1982 | /// Utility cheatcode to set arbitrary storage for given target address. |
| 1983 | function setArbitraryStorage(address target) external; |
| 1984 | |
| 1985 | /// Utility cheatcode to set arbitrary storage for given target address and overwrite |
| 1986 | /// any storage slots that have been previously set. |
| 1987 | function setArbitraryStorage(address target, bool overwrite) external; |
| 1988 | |
| 1989 | /// Set RNG seed. |
| 1990 | function setSeed(uint256 seed) external; |
| 1991 | |
| 1992 | /// Randomly shuffles an array. |
| 1993 | function shuffle(uint256[] calldata array) external returns (uint256[] memory); |
| 1994 | |
| 1995 | /// Sorts an array in ascending order. |
| 1996 | function sort(uint256[] calldata array) external returns (uint256[] memory); |
| 1997 | |
| 1998 | /// Encodes a `bytes` value to a base64url string. |
| 1999 | function toBase64URL(bytes calldata data) external pure returns (string memory); |
| 2000 | |
| 2001 | /// Encodes a `string` value to a base64url string. |
| 2002 | function toBase64URL(string calldata data) external pure returns (string memory); |
| 2003 | |
| 2004 | /// Encodes a `bytes` value to a base64 string. |
| 2005 | function toBase64(bytes calldata data) external pure returns (string memory); |
| 2006 | |
| 2007 | /// Encodes a `string` value to a base64 string. |
| 2008 | function toBase64(string calldata data) external pure returns (string memory); |
| 2009 | |
| 2010 | /// RLP encodes a list of bytes into an RLP payload. |
| 2011 | function toRlp(bytes[] calldata data) external pure returns (bytes memory); |
| 2012 | } |
| 2013 | |
| 2014 | /// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used |
| 2015 | /// in tests, but it is not recommended to use these cheats in scripts. |
| 2016 | interface Vm is VmSafe { |
| 2017 | // ======== EVM ======== |
| 2018 | |
| 2019 | /// Utility cheatcode to set an EIP-2930 access list for all subsequent transactions. |
| 2020 | function accessList(AccessListItem[] calldata access) external; |
| 2021 | |
| 2022 | /// Returns the identifier of the currently active fork. Reverts if no fork is currently active. |
| 2023 | function activeFork() external view returns (uint256 forkId); |
| 2024 | |
| 2025 | /// In forking mode, explicitly grant the given address cheatcode access. |
| 2026 | function allowCheatcodes(address account) external; |
| 2027 | |
| 2028 | /// Sets `block.blobbasefee` |
| 2029 | function blobBaseFee(uint256 newBlobBaseFee) external; |
| 2030 | |
| 2031 | /// Sets the blobhashes in the transaction. |
| 2032 | /// Not available on EVM versions before Cancun. |
| 2033 | /// If used on unsupported EVM versions it will revert. |
| 2034 | function blobhashes(bytes32[] calldata hashes) external; |
| 2035 | |
| 2036 | /// Sets `block.chainid`. |
| 2037 | function chainId(uint256 newChainId) external; |
| 2038 | |
| 2039 | /// Clears all mocked calls. |
| 2040 | function clearMockedCalls() external; |
| 2041 | |
| 2042 | /// Clones a source account code, state, balance and nonce to a target account and updates in-memory EVM state. |
| 2043 | function cloneAccount(address source, address target) external; |
| 2044 | |
| 2045 | /// Sets `block.coinbase`. |
| 2046 | function coinbase(address newCoinbase) external; |
| 2047 | |
| 2048 | /// Marks the slots of an account and the account address as cold. |
| 2049 | function cool(address target) external; |
| 2050 | |
| 2051 | /// Utility cheatcode to mark specific storage slot as cold, simulating no prior read. |
| 2052 | function coolSlot(address target, bytes32 slot) external; |
| 2053 | |
| 2054 | /// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork. |
| 2055 | function createFork(string calldata urlOrAlias) external returns (uint256 forkId); |
| 2056 | |
| 2057 | /// Creates a new fork with the given endpoint and block and returns the identifier of the fork. |
| 2058 | function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); |
| 2059 | |
| 2060 | /// Creates a new fork with the given endpoint and at the block the given transaction was mined in, |
| 2061 | /// replays all transaction mined in the block before the transaction, and returns the identifier of the fork. |
| 2062 | function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); |
| 2063 | |
| 2064 | /// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork. |
| 2065 | function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId); |
| 2066 | |
| 2067 | /// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork. |
| 2068 | function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); |
| 2069 | |
| 2070 | /// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, |
| 2071 | /// replays all transaction mined in the block before the transaction, returns the identifier of the fork. |
| 2072 | function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); |
| 2073 | |
| 2074 | /// Sets an address' balance. |
| 2075 | function deal(address account, uint256 newBalance) external; |
| 2076 | |
| 2077 | /// Removes the snapshot with the given ID created by `snapshot`. |
| 2078 | /// Takes the snapshot ID to delete. |
| 2079 | /// Returns `true` if the snapshot was successfully deleted. |
| 2080 | /// Returns `false` if the snapshot does not exist. |
| 2081 | function deleteStateSnapshot(uint256 snapshotId) external returns (bool success); |
| 2082 | |
| 2083 | /// Removes _all_ snapshots previously created by `snapshot`. |
| 2084 | function deleteStateSnapshots() external; |
| 2085 | |
| 2086 | /// Sets `block.difficulty`. |
| 2087 | /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. |
| 2088 | /// Reverts if used on unsupported EVM versions. |
| 2089 | function difficulty(uint256 newDifficulty) external; |
| 2090 | |
| 2091 | /// Dump a genesis JSON file's `allocs` to disk. |
| 2092 | function dumpState(string calldata pathToStateJson) external; |
| 2093 | |
| 2094 | /// Sets an address' code. |
| 2095 | function etch(address target, bytes calldata newRuntimeBytecode) external; |
| 2096 | |
| 2097 | /// Sets `block.basefee`. |
| 2098 | function fee(uint256 newBasefee) external; |
| 2099 | |
| 2100 | /// Gets the blockhashes from the current transaction. |
| 2101 | /// Not available on EVM versions before Cancun. |
| 2102 | /// If used on unsupported EVM versions it will revert. |
| 2103 | function getBlobhashes() external view returns (bytes32[] memory hashes); |
| 2104 | |
| 2105 | /// Returns true if the account is marked as persistent. |
| 2106 | function isPersistent(address account) external view returns (bool persistent); |
| 2107 | |
| 2108 | /// Load a genesis JSON file's `allocs` into the in-memory EVM state. |
| 2109 | function loadAllocs(string calldata pathToAllocsJson) external; |
| 2110 | |
| 2111 | /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup |
| 2112 | /// Meaning, changes made to the state of this account will be kept when switching forks. |
| 2113 | function makePersistent(address account) external; |
| 2114 | |
| 2115 | /// See `makePersistent(address)`. |
| 2116 | function makePersistent(address account0, address account1) external; |
| 2117 | |
| 2118 | /// See `makePersistent(address)`. |
| 2119 | function makePersistent(address account0, address account1, address account2) external; |
| 2120 | |
| 2121 | /// See `makePersistent(address)`. |
| 2122 | function makePersistent(address[] calldata accounts) external; |
| 2123 | |
| 2124 | /// Reverts a call to an address with specified revert data. |
| 2125 | function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; |
| 2126 | |
| 2127 | /// Reverts a call to an address with a specific `msg.value`, with specified revert data. |
| 2128 | function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) external; |
| 2129 | |
| 2130 | /// Reverts a call to an address with specified revert data. |
| 2131 | /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. |
| 2132 | function mockCallRevert(address callee, bytes4 data, bytes calldata revertData) external; |
| 2133 | |
| 2134 | /// Reverts a call to an address with a specific `msg.value`, with specified revert data. |
| 2135 | /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. |
| 2136 | function mockCallRevert(address callee, uint256 msgValue, bytes4 data, bytes calldata revertData) external; |
| 2137 | |
| 2138 | /// Mocks a call to an address, returning specified data. |
| 2139 | /// Calldata can either be strict or a partial match, e.g. if you only |
| 2140 | /// pass a Solidity selector to the expected calldata, then the entire Solidity |
| 2141 | /// function will be mocked. |
| 2142 | function mockCall(address callee, bytes calldata data, bytes calldata returnData) external; |
| 2143 | |
| 2144 | /// Mocks a call to an address with a specific `msg.value`, returning specified data. |
| 2145 | /// Calldata match takes precedence over `msg.value` in case of ambiguity. |
| 2146 | function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; |
| 2147 | |
| 2148 | /// Mocks a call to an address, returning specified data. |
| 2149 | /// Calldata can either be strict or a partial match, e.g. if you only |
| 2150 | /// pass a Solidity selector to the expected calldata, then the entire Solidity |
| 2151 | /// function will be mocked. |
| 2152 | /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. |
| 2153 | function mockCall(address callee, bytes4 data, bytes calldata returnData) external; |
| 2154 | |
| 2155 | /// Mocks a call to an address with a specific `msg.value`, returning specified data. |
| 2156 | /// Calldata match takes precedence over `msg.value` in case of ambiguity. |
| 2157 | /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. |
| 2158 | function mockCall(address callee, uint256 msgValue, bytes4 data, bytes calldata returnData) external; |
| 2159 | |
| 2160 | /// Mocks multiple calls to an address, returning specified data for each call. |
| 2161 | function mockCalls(address callee, bytes calldata data, bytes[] calldata returnData) external; |
| 2162 | |
| 2163 | /// Mocks multiple calls to an address with a specific `msg.value`, returning specified data for each call. |
| 2164 | function mockCalls(address callee, uint256 msgValue, bytes calldata data, bytes[] calldata returnData) external; |
| 2165 | |
| 2166 | /// Whenever a call is made to `callee` with calldata `data`, this cheatcode instead calls |
| 2167 | /// `target` with the same calldata. This functionality is similar to a delegate call made to |
| 2168 | /// `target` contract from `callee`. |
| 2169 | /// Can be used to substitute a call to a function with another implementation that captures |
| 2170 | /// the primary logic of the original function but is easier to reason about. |
| 2171 | /// If calldata is not a strict match then partial match by selector is attempted. |
| 2172 | function mockFunction(address callee, address target, bytes calldata data) external; |
| 2173 | |
| 2174 | /// Utility cheatcode to remove any EIP-2930 access list set by `accessList` cheatcode. |
| 2175 | function noAccessList() external; |
| 2176 | |
| 2177 | /// Sets the *next* call's `msg.sender` to be the input address. |
| 2178 | function prank(address msgSender) external; |
| 2179 | |
| 2180 | /// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. |
| 2181 | function prank(address msgSender, address txOrigin) external; |
| 2182 | |
| 2183 | /// Sets the *next* delegate call's `msg.sender` to be the input address. |
| 2184 | function prank(address msgSender, bool delegateCall) external; |
| 2185 | |
| 2186 | /// Sets the *next* delegate call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. |
| 2187 | function prank(address msgSender, address txOrigin, bool delegateCall) external; |
| 2188 | |
| 2189 | /// Sets `block.prevrandao`. |
| 2190 | /// Not available on EVM versions before Paris. Use `difficulty` instead. |
| 2191 | /// If used on unsupported EVM versions it will revert. |
| 2192 | function prevrandao(bytes32 newPrevrandao) external; |
| 2193 | |
| 2194 | /// Sets `block.prevrandao`. |
| 2195 | /// Not available on EVM versions before Paris. Use `difficulty` instead. |
| 2196 | /// If used on unsupported EVM versions it will revert. |
| 2197 | function prevrandao(uint256 newPrevrandao) external; |
| 2198 | |
| 2199 | /// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification. |
| 2200 | function readCallers() external view returns (CallerMode callerMode, address msgSender, address txOrigin); |
| 2201 | |
| 2202 | /// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts. |
| 2203 | function resetNonce(address account) external; |
| 2204 | |
| 2205 | /// Revert the state of the EVM to a previous snapshot |
| 2206 | /// Takes the snapshot ID to revert to. |
| 2207 | /// Returns `true` if the snapshot was successfully reverted. |
| 2208 | /// Returns `false` if the snapshot does not exist. |
| 2209 | /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteStateSnapshot`. |
| 2210 | function revertToState(uint256 snapshotId) external returns (bool success); |
| 2211 | |
| 2212 | /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots |
| 2213 | /// Takes the snapshot ID to revert to. |
| 2214 | /// Returns `true` if the snapshot was successfully reverted and deleted. |
| 2215 | /// Returns `false` if the snapshot does not exist. |
| 2216 | function revertToStateAndDelete(uint256 snapshotId) external returns (bool success); |
| 2217 | |
| 2218 | /// Revokes persistent status from the address, previously added via `makePersistent`. |
| 2219 | function revokePersistent(address account) external; |
| 2220 | |
| 2221 | /// See `revokePersistent(address)`. |
| 2222 | function revokePersistent(address[] calldata accounts) external; |
| 2223 | |
| 2224 | /// Sets `block.height`. |
| 2225 | function roll(uint256 newHeight) external; |
| 2226 | |
| 2227 | /// Updates the currently active fork to given block number |
| 2228 | /// This is similar to `roll` but for the currently active fork. |
| 2229 | function rollFork(uint256 blockNumber) external; |
| 2230 | |
| 2231 | /// Updates the currently active fork to given transaction. This will `rollFork` with the number |
| 2232 | /// of the block the transaction was mined in and replays all transaction mined before it in the block. |
| 2233 | function rollFork(bytes32 txHash) external; |
| 2234 | |
| 2235 | /// Updates the given fork to given block number. |
| 2236 | function rollFork(uint256 forkId, uint256 blockNumber) external; |
| 2237 | |
| 2238 | /// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block. |
| 2239 | function rollFork(uint256 forkId, bytes32 txHash) external; |
| 2240 | |
| 2241 | /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. |
| 2242 | function selectFork(uint256 forkId) external; |
| 2243 | |
| 2244 | /// Set blockhash for the current block. |
| 2245 | /// It only sets the blockhash for blocks where `block.number - 256 <= number < block.number`. |
| 2246 | function setBlockhash(uint256 blockNumber, bytes32 blockHash) external; |
| 2247 | |
| 2248 | /// Sets the nonce of an account. Must be higher than the current nonce of the account. |
| 2249 | function setNonce(address account, uint64 newNonce) external; |
| 2250 | |
| 2251 | /// Sets the nonce of an account to an arbitrary value. |
| 2252 | function setNonceUnsafe(address account, uint64 newNonce) external; |
| 2253 | |
| 2254 | /// Snapshot capture the gas usage of the last call by name from the callee perspective. |
| 2255 | function snapshotGasLastCall(string calldata name) external returns (uint256 gasUsed); |
| 2256 | |
| 2257 | /// Snapshot capture the gas usage of the last call by name in a group from the callee perspective. |
| 2258 | function snapshotGasLastCall(string calldata group, string calldata name) external returns (uint256 gasUsed); |
| 2259 | |
| 2260 | /// Snapshot the current state of the evm. |
| 2261 | /// Returns the ID of the snapshot that was created. |
| 2262 | /// To revert a snapshot use `revertToState`. |
| 2263 | function snapshotState() external returns (uint256 snapshotId); |
| 2264 | |
| 2265 | /// Snapshot capture an arbitrary numerical value by name. |
| 2266 | /// The group name is derived from the contract name. |
| 2267 | function snapshotValue(string calldata name, uint256 value) external; |
| 2268 | |
| 2269 | /// Snapshot capture an arbitrary numerical value by name in a group. |
| 2270 | function snapshotValue(string calldata group, string calldata name, uint256 value) external; |
| 2271 | |
| 2272 | /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called. |
| 2273 | function startPrank(address msgSender) external; |
| 2274 | |
| 2275 | /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. |
| 2276 | function startPrank(address msgSender, address txOrigin) external; |
| 2277 | |
| 2278 | /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called. |
| 2279 | function startPrank(address msgSender, bool delegateCall) external; |
| 2280 | |
| 2281 | /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. |
| 2282 | function startPrank(address msgSender, address txOrigin, bool delegateCall) external; |
| 2283 | |
| 2284 | /// Start a snapshot capture of the current gas usage by name. |
| 2285 | /// The group name is derived from the contract name. |
| 2286 | function startSnapshotGas(string calldata name) external; |
| 2287 | |
| 2288 | /// Start a snapshot capture of the current gas usage by name in a group. |
| 2289 | function startSnapshotGas(string calldata group, string calldata name) external; |
| 2290 | |
| 2291 | /// Resets subsequent calls' `msg.sender` to be `address(this)`. |
| 2292 | function stopPrank() external; |
| 2293 | |
| 2294 | /// Stop the snapshot capture of the current gas by latest snapshot name, capturing the gas used since the start. |
| 2295 | function stopSnapshotGas() external returns (uint256 gasUsed); |
| 2296 | |
| 2297 | /// Stop the snapshot capture of the current gas usage by name, capturing the gas used since the start. |
| 2298 | /// The group name is derived from the contract name. |
| 2299 | function stopSnapshotGas(string calldata name) external returns (uint256 gasUsed); |
| 2300 | |
| 2301 | /// Stop the snapshot capture of the current gas usage by name in a group, capturing the gas used since the start. |
| 2302 | function stopSnapshotGas(string calldata group, string calldata name) external returns (uint256 gasUsed); |
| 2303 | |
| 2304 | /// Stores a value to an address' storage slot. |
| 2305 | function store(address target, bytes32 slot, bytes32 value) external; |
| 2306 | |
| 2307 | /// Fetches the given transaction from the active fork and executes it on the current state. |
| 2308 | function transact(bytes32 txHash) external; |
| 2309 | |
| 2310 | /// Fetches the given transaction from the given fork and executes it on the current state. |
| 2311 | function transact(uint256 forkId, bytes32 txHash) external; |
| 2312 | |
| 2313 | /// Sets `tx.gasprice`. |
| 2314 | function txGasPrice(uint256 newGasPrice) external; |
| 2315 | |
| 2316 | /// Utility cheatcode to mark specific storage slot as warm, simulating a prior read. |
| 2317 | function warmSlot(address target, bytes32 slot) external; |
| 2318 | |
| 2319 | /// Sets `block.timestamp`. |
| 2320 | function warp(uint256 newTimestamp) external; |
| 2321 | |
| 2322 | /// `deleteSnapshot` is being deprecated in favor of `deleteStateSnapshot`. It will be removed in future versions. |
| 2323 | function deleteSnapshot(uint256 snapshotId) external returns (bool success); |
| 2324 | |
| 2325 | /// `deleteSnapshots` is being deprecated in favor of `deleteStateSnapshots`. It will be removed in future versions. |
| 2326 | function deleteSnapshots() external; |
| 2327 | |
| 2328 | /// `revertToAndDelete` is being deprecated in favor of `revertToStateAndDelete`. It will be removed in future versions. |
| 2329 | function revertToAndDelete(uint256 snapshotId) external returns (bool success); |
| 2330 | |
| 2331 | /// `revertTo` is being deprecated in favor of `revertToState`. It will be removed in future versions. |
| 2332 | function revertTo(uint256 snapshotId) external returns (bool success); |
| 2333 | |
| 2334 | /// `snapshot` is being deprecated in favor of `snapshotState`. It will be removed in future versions. |
| 2335 | function snapshot() external returns (uint256 snapshotId); |
| 2336 | |
| 2337 | // ======== Testing ======== |
| 2338 | |
| 2339 | /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. |
| 2340 | function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external; |
| 2341 | |
| 2342 | /// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. |
| 2343 | function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) |
| 2344 | external; |
| 2345 | |
| 2346 | /// Expects a call to an address with the specified calldata. |
| 2347 | /// Calldata can either be a strict or a partial match. |
| 2348 | function expectCall(address callee, bytes calldata data) external; |
| 2349 | |
| 2350 | /// Expects given number of calls to an address with the specified calldata. |
| 2351 | function expectCall(address callee, bytes calldata data, uint64 count) external; |
| 2352 | |
| 2353 | /// Expects a call to an address with the specified `msg.value` and calldata. |
| 2354 | function expectCall(address callee, uint256 msgValue, bytes calldata data) external; |
| 2355 | |
| 2356 | /// Expects given number of calls to an address with the specified `msg.value` and calldata. |
| 2357 | function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external; |
| 2358 | |
| 2359 | /// Expect a call to an address with the specified `msg.value`, gas, and calldata. |
| 2360 | function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external; |
| 2361 | |
| 2362 | /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata. |
| 2363 | function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; |
| 2364 | |
| 2365 | /// Expects the deployment of the specified bytecode by the specified address using the CREATE opcode |
| 2366 | function expectCreate(bytes calldata bytecode, address deployer) external; |
| 2367 | |
| 2368 | /// Expects the deployment of the specified bytecode by the specified address using the CREATE2 opcode |
| 2369 | function expectCreate2(bytes calldata bytecode, address deployer) external; |
| 2370 | |
| 2371 | /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). |
| 2372 | /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if |
| 2373 | /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). |
| 2374 | function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) |
| 2375 | external; |
| 2376 | |
| 2377 | /// Same as the previous method, but also checks supplied address against emitting contract. |
| 2378 | function expectEmitAnonymous( |
| 2379 | bool checkTopic0, |
| 2380 | bool checkTopic1, |
| 2381 | bool checkTopic2, |
| 2382 | bool checkTopic3, |
| 2383 | bool checkData, |
| 2384 | address emitter |
| 2385 | ) external; |
| 2386 | |
| 2387 | /// Prepare an expected anonymous log with all topic and data checks enabled. |
| 2388 | /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if |
| 2389 | /// logs were emitted in the expected order with the expected topics and data. |
| 2390 | function expectEmitAnonymous() external; |
| 2391 | |
| 2392 | /// Same as the previous method, but also checks supplied address against emitting contract. |
| 2393 | function expectEmitAnonymous(address emitter) external; |
| 2394 | |
| 2395 | /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). |
| 2396 | /// Call this function, then emit an event, then call a function. Internally after the call, we check if |
| 2397 | /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). |
| 2398 | function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external; |
| 2399 | |
| 2400 | /// Same as the previous method, but also checks supplied address against emitting contract. |
| 2401 | function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external; |
| 2402 | |
| 2403 | /// Prepare an expected log with all topic and data checks enabled. |
| 2404 | /// Call this function, then emit an event, then call a function. Internally after the call, we check if |
| 2405 | /// logs were emitted in the expected order with the expected topics and data. |
| 2406 | function expectEmit() external; |
| 2407 | |
| 2408 | /// Same as the previous method, but also checks supplied address against emitting contract. |
| 2409 | function expectEmit(address emitter) external; |
| 2410 | |
| 2411 | /// Expect a given number of logs with the provided topics. |
| 2412 | function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external; |
| 2413 | |
| 2414 | /// Expect a given number of logs from a specific emitter with the provided topics. |
| 2415 | function expectEmit( |
| 2416 | bool checkTopic1, |
| 2417 | bool checkTopic2, |
| 2418 | bool checkTopic3, |
| 2419 | bool checkData, |
| 2420 | address emitter, |
| 2421 | uint64 count |
| 2422 | ) external; |
| 2423 | |
| 2424 | /// Expect a given number of logs with all topic and data checks enabled. |
| 2425 | function expectEmit(uint64 count) external; |
| 2426 | |
| 2427 | /// Expect a given number of logs from a specific emitter with all topic and data checks enabled. |
| 2428 | function expectEmit(address emitter, uint64 count) external; |
| 2429 | |
| 2430 | /// Expects an error on next call that starts with the revert data. |
| 2431 | function expectPartialRevert(bytes4 revertData) external; |
| 2432 | |
| 2433 | /// Expects an error on next call to reverter address, that starts with the revert data. |
| 2434 | function expectPartialRevert(bytes4 revertData, address reverter) external; |
| 2435 | |
| 2436 | /// Expects an error on next call with any revert data. |
| 2437 | function expectRevert() external; |
| 2438 | |
| 2439 | /// Expects an error on next call that exactly matches the revert data. |
| 2440 | function expectRevert(bytes4 revertData) external; |
| 2441 | |
| 2442 | /// Expects a `count` number of reverts from the upcoming calls from the reverter address that match the revert data. |
| 2443 | function expectRevert(bytes4 revertData, address reverter, uint64 count) external; |
| 2444 | |
| 2445 | /// Expects a `count` number of reverts from the upcoming calls from the reverter address that exactly match the revert data. |
| 2446 | function expectRevert(bytes calldata revertData, address reverter, uint64 count) external; |
| 2447 | |
| 2448 | /// Expects an error on next call that exactly matches the revert data. |
| 2449 | function expectRevert(bytes calldata revertData) external; |
| 2450 | |
| 2451 | /// Expects an error with any revert data on next call to reverter address. |
| 2452 | function expectRevert(address reverter) external; |
| 2453 | |
| 2454 | /// Expects an error from reverter address on next call, with any revert data. |
| 2455 | function expectRevert(bytes4 revertData, address reverter) external; |
| 2456 | |
| 2457 | /// Expects an error from reverter address on next call, that exactly matches the revert data. |
| 2458 | function expectRevert(bytes calldata revertData, address reverter) external; |
| 2459 | |
| 2460 | /// Expects a `count` number of reverts from the upcoming calls with any revert data or reverter. |
| 2461 | function expectRevert(uint64 count) external; |
| 2462 | |
| 2463 | /// Expects a `count` number of reverts from the upcoming calls that match the revert data. |
| 2464 | function expectRevert(bytes4 revertData, uint64 count) external; |
| 2465 | |
| 2466 | /// Expects a `count` number of reverts from the upcoming calls that exactly match the revert data. |
| 2467 | function expectRevert(bytes calldata revertData, uint64 count) external; |
| 2468 | |
| 2469 | /// Expects a `count` number of reverts from the upcoming calls from the reverter address. |
| 2470 | function expectRevert(address reverter, uint64 count) external; |
| 2471 | |
| 2472 | /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other |
| 2473 | /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. |
| 2474 | function expectSafeMemory(uint64 min, uint64 max) external; |
| 2475 | |
| 2476 | /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext. |
| 2477 | /// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges |
| 2478 | /// to the set. |
| 2479 | function expectSafeMemoryCall(uint64 min, uint64 max) external; |
| 2480 | |
| 2481 | /// Marks a test as skipped. Must be called at the top level of a test. |
| 2482 | function skip(bool skipTest) external; |
| 2483 | |
| 2484 | /// Marks a test as skipped with a reason. Must be called at the top level of a test. |
| 2485 | function skip(bool skipTest, string calldata reason) external; |
| 2486 | |
| 2487 | /// Stops all safe memory expectation in the current subcontext. |
| 2488 | function stopExpectSafeMemory() external; |
| 2489 | |
| 2490 | // ======== Utilities ======== |
| 2491 | |
| 2492 | /// Causes the next contract creation (via new) to fail and return its initcode in the returndata buffer. |
| 2493 | /// This allows type-safe access to the initcode payload that would be used for contract creation. |
| 2494 | /// Example usage: |
| 2495 | /// vm.interceptInitcode(); |
| 2496 | /// bytes memory initcode; |
| 2497 | /// try new MyContract(param1, param2) { assert(false); } |
| 2498 | /// catch (bytes memory interceptedInitcode) { initcode = interceptedInitcode; } |
| 2499 | function interceptInitcode() external; |
| 2500 | } |
| 2501 |
0.0%
lib/forge-std/src/console.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | library console { |
| 5 | address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; |
| 6 | |
| 7 | function _sendLogPayloadImplementation(bytes memory payload) internal view { |
| 8 | address consoleAddress = CONSOLE_ADDRESS; |
| 9 | assembly ("memory-safe") { |
| 10 | pop(staticcall(gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0)) |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | function _castToPure(function(bytes memory) internal view fnIn) |
| 15 | internal |
| 16 | pure |
| 17 | returns (function(bytes memory) pure fnOut) |
| 18 | { |
| 19 | assembly { |
| 20 | fnOut := fnIn |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | function _sendLogPayload(bytes memory payload) internal pure { |
| 25 | _castToPure(_sendLogPayloadImplementation)(payload); |
| 26 | } |
| 27 | |
| 28 | function log() internal pure { |
| 29 | _sendLogPayload(abi.encodeWithSignature("log()")); |
| 30 | } |
| 31 | |
| 32 | function logInt(int256 p0) internal pure { |
| 33 | _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); |
| 34 | } |
| 35 | |
| 36 | function logUint(uint256 p0) internal pure { |
| 37 | _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); |
| 38 | } |
| 39 | |
| 40 | function logString(string memory p0) internal pure { |
| 41 | _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); |
| 42 | } |
| 43 | |
| 44 | function logBool(bool p0) internal pure { |
| 45 | _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); |
| 46 | } |
| 47 | |
| 48 | function logAddress(address p0) internal pure { |
| 49 | _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); |
| 50 | } |
| 51 | |
| 52 | function logBytes(bytes memory p0) internal pure { |
| 53 | _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); |
| 54 | } |
| 55 | |
| 56 | function logBytes1(bytes1 p0) internal pure { |
| 57 | _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); |
| 58 | } |
| 59 | |
| 60 | function logBytes2(bytes2 p0) internal pure { |
| 61 | _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); |
| 62 | } |
| 63 | |
| 64 | function logBytes3(bytes3 p0) internal pure { |
| 65 | _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); |
| 66 | } |
| 67 | |
| 68 | function logBytes4(bytes4 p0) internal pure { |
| 69 | _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); |
| 70 | } |
| 71 | |
| 72 | function logBytes5(bytes5 p0) internal pure { |
| 73 | _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); |
| 74 | } |
| 75 | |
| 76 | function logBytes6(bytes6 p0) internal pure { |
| 77 | _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); |
| 78 | } |
| 79 | |
| 80 | function logBytes7(bytes7 p0) internal pure { |
| 81 | _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); |
| 82 | } |
| 83 | |
| 84 | function logBytes8(bytes8 p0) internal pure { |
| 85 | _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); |
| 86 | } |
| 87 | |
| 88 | function logBytes9(bytes9 p0) internal pure { |
| 89 | _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); |
| 90 | } |
| 91 | |
| 92 | function logBytes10(bytes10 p0) internal pure { |
| 93 | _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); |
| 94 | } |
| 95 | |
| 96 | function logBytes11(bytes11 p0) internal pure { |
| 97 | _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); |
| 98 | } |
| 99 | |
| 100 | function logBytes12(bytes12 p0) internal pure { |
| 101 | _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); |
| 102 | } |
| 103 | |
| 104 | function logBytes13(bytes13 p0) internal pure { |
| 105 | _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); |
| 106 | } |
| 107 | |
| 108 | function logBytes14(bytes14 p0) internal pure { |
| 109 | _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); |
| 110 | } |
| 111 | |
| 112 | function logBytes15(bytes15 p0) internal pure { |
| 113 | _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); |
| 114 | } |
| 115 | |
| 116 | function logBytes16(bytes16 p0) internal pure { |
| 117 | _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); |
| 118 | } |
| 119 | |
| 120 | function logBytes17(bytes17 p0) internal pure { |
| 121 | _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); |
| 122 | } |
| 123 | |
| 124 | function logBytes18(bytes18 p0) internal pure { |
| 125 | _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); |
| 126 | } |
| 127 | |
| 128 | function logBytes19(bytes19 p0) internal pure { |
| 129 | _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); |
| 130 | } |
| 131 | |
| 132 | function logBytes20(bytes20 p0) internal pure { |
| 133 | _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); |
| 134 | } |
| 135 | |
| 136 | function logBytes21(bytes21 p0) internal pure { |
| 137 | _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); |
| 138 | } |
| 139 | |
| 140 | function logBytes22(bytes22 p0) internal pure { |
| 141 | _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); |
| 142 | } |
| 143 | |
| 144 | function logBytes23(bytes23 p0) internal pure { |
| 145 | _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); |
| 146 | } |
| 147 | |
| 148 | function logBytes24(bytes24 p0) internal pure { |
| 149 | _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); |
| 150 | } |
| 151 | |
| 152 | function logBytes25(bytes25 p0) internal pure { |
| 153 | _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); |
| 154 | } |
| 155 | |
| 156 | function logBytes26(bytes26 p0) internal pure { |
| 157 | _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); |
| 158 | } |
| 159 | |
| 160 | function logBytes27(bytes27 p0) internal pure { |
| 161 | _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); |
| 162 | } |
| 163 | |
| 164 | function logBytes28(bytes28 p0) internal pure { |
| 165 | _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); |
| 166 | } |
| 167 | |
| 168 | function logBytes29(bytes29 p0) internal pure { |
| 169 | _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); |
| 170 | } |
| 171 | |
| 172 | function logBytes30(bytes30 p0) internal pure { |
| 173 | _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); |
| 174 | } |
| 175 | |
| 176 | function logBytes31(bytes31 p0) internal pure { |
| 177 | _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); |
| 178 | } |
| 179 | |
| 180 | function logBytes32(bytes32 p0) internal pure { |
| 181 | _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); |
| 182 | } |
| 183 | |
| 184 | function log(uint256 p0) internal pure { |
| 185 | _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); |
| 186 | } |
| 187 | |
| 188 | function log(int256 p0) internal pure { |
| 189 | _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); |
| 190 | } |
| 191 | |
| 192 | function log(string memory p0) internal pure { |
| 193 | _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); |
| 194 | } |
| 195 | |
| 196 | function log(bool p0) internal pure { |
| 197 | _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); |
| 198 | } |
| 199 | |
| 200 | function log(address p0) internal pure { |
| 201 | _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); |
| 202 | } |
| 203 | |
| 204 | function log(uint256 p0, uint256 p1) internal pure { |
| 205 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); |
| 206 | } |
| 207 | |
| 208 | function log(uint256 p0, string memory p1) internal pure { |
| 209 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); |
| 210 | } |
| 211 | |
| 212 | function log(uint256 p0, bool p1) internal pure { |
| 213 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); |
| 214 | } |
| 215 | |
| 216 | function log(uint256 p0, address p1) internal pure { |
| 217 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); |
| 218 | } |
| 219 | |
| 220 | function log(string memory p0, uint256 p1) internal pure { |
| 221 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); |
| 222 | } |
| 223 | |
| 224 | function log(string memory p0, int256 p1) internal pure { |
| 225 | _sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1)); |
| 226 | } |
| 227 | |
| 228 | function log(string memory p0, string memory p1) internal pure { |
| 229 | _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); |
| 230 | } |
| 231 | |
| 232 | function log(string memory p0, bool p1) internal pure { |
| 233 | _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); |
| 234 | } |
| 235 | |
| 236 | function log(string memory p0, address p1) internal pure { |
| 237 | _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); |
| 238 | } |
| 239 | |
| 240 | function log(bool p0, uint256 p1) internal pure { |
| 241 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); |
| 242 | } |
| 243 | |
| 244 | function log(bool p0, string memory p1) internal pure { |
| 245 | _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); |
| 246 | } |
| 247 | |
| 248 | function log(bool p0, bool p1) internal pure { |
| 249 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); |
| 250 | } |
| 251 | |
| 252 | function log(bool p0, address p1) internal pure { |
| 253 | _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); |
| 254 | } |
| 255 | |
| 256 | function log(address p0, uint256 p1) internal pure { |
| 257 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); |
| 258 | } |
| 259 | |
| 260 | function log(address p0, string memory p1) internal pure { |
| 261 | _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); |
| 262 | } |
| 263 | |
| 264 | function log(address p0, bool p1) internal pure { |
| 265 | _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); |
| 266 | } |
| 267 | |
| 268 | function log(address p0, address p1) internal pure { |
| 269 | _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); |
| 270 | } |
| 271 | |
| 272 | function log(uint256 p0, uint256 p1, uint256 p2) internal pure { |
| 273 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); |
| 274 | } |
| 275 | |
| 276 | function log(uint256 p0, uint256 p1, string memory p2) internal pure { |
| 277 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); |
| 278 | } |
| 279 | |
| 280 | function log(uint256 p0, uint256 p1, bool p2) internal pure { |
| 281 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); |
| 282 | } |
| 283 | |
| 284 | function log(uint256 p0, uint256 p1, address p2) internal pure { |
| 285 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); |
| 286 | } |
| 287 | |
| 288 | function log(uint256 p0, string memory p1, uint256 p2) internal pure { |
| 289 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); |
| 290 | } |
| 291 | |
| 292 | function log(uint256 p0, string memory p1, string memory p2) internal pure { |
| 293 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); |
| 294 | } |
| 295 | |
| 296 | function log(uint256 p0, string memory p1, bool p2) internal pure { |
| 297 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); |
| 298 | } |
| 299 | |
| 300 | function log(uint256 p0, string memory p1, address p2) internal pure { |
| 301 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); |
| 302 | } |
| 303 | |
| 304 | function log(uint256 p0, bool p1, uint256 p2) internal pure { |
| 305 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); |
| 306 | } |
| 307 | |
| 308 | function log(uint256 p0, bool p1, string memory p2) internal pure { |
| 309 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); |
| 310 | } |
| 311 | |
| 312 | function log(uint256 p0, bool p1, bool p2) internal pure { |
| 313 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); |
| 314 | } |
| 315 | |
| 316 | function log(uint256 p0, bool p1, address p2) internal pure { |
| 317 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); |
| 318 | } |
| 319 | |
| 320 | function log(uint256 p0, address p1, uint256 p2) internal pure { |
| 321 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); |
| 322 | } |
| 323 | |
| 324 | function log(uint256 p0, address p1, string memory p2) internal pure { |
| 325 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); |
| 326 | } |
| 327 | |
| 328 | function log(uint256 p0, address p1, bool p2) internal pure { |
| 329 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); |
| 330 | } |
| 331 | |
| 332 | function log(uint256 p0, address p1, address p2) internal pure { |
| 333 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); |
| 334 | } |
| 335 | |
| 336 | function log(string memory p0, uint256 p1, uint256 p2) internal pure { |
| 337 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); |
| 338 | } |
| 339 | |
| 340 | function log(string memory p0, uint256 p1, string memory p2) internal pure { |
| 341 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); |
| 342 | } |
| 343 | |
| 344 | function log(string memory p0, uint256 p1, bool p2) internal pure { |
| 345 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); |
| 346 | } |
| 347 | |
| 348 | function log(string memory p0, uint256 p1, address p2) internal pure { |
| 349 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); |
| 350 | } |
| 351 | |
| 352 | function log(string memory p0, string memory p1, uint256 p2) internal pure { |
| 353 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); |
| 354 | } |
| 355 | |
| 356 | function log(string memory p0, string memory p1, string memory p2) internal pure { |
| 357 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); |
| 358 | } |
| 359 | |
| 360 | function log(string memory p0, string memory p1, bool p2) internal pure { |
| 361 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); |
| 362 | } |
| 363 | |
| 364 | function log(string memory p0, string memory p1, address p2) internal pure { |
| 365 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); |
| 366 | } |
| 367 | |
| 368 | function log(string memory p0, bool p1, uint256 p2) internal pure { |
| 369 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); |
| 370 | } |
| 371 | |
| 372 | function log(string memory p0, bool p1, string memory p2) internal pure { |
| 373 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); |
| 374 | } |
| 375 | |
| 376 | function log(string memory p0, bool p1, bool p2) internal pure { |
| 377 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); |
| 378 | } |
| 379 | |
| 380 | function log(string memory p0, bool p1, address p2) internal pure { |
| 381 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); |
| 382 | } |
| 383 | |
| 384 | function log(string memory p0, address p1, uint256 p2) internal pure { |
| 385 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); |
| 386 | } |
| 387 | |
| 388 | function log(string memory p0, address p1, string memory p2) internal pure { |
| 389 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); |
| 390 | } |
| 391 | |
| 392 | function log(string memory p0, address p1, bool p2) internal pure { |
| 393 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); |
| 394 | } |
| 395 | |
| 396 | function log(string memory p0, address p1, address p2) internal pure { |
| 397 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); |
| 398 | } |
| 399 | |
| 400 | function log(bool p0, uint256 p1, uint256 p2) internal pure { |
| 401 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); |
| 402 | } |
| 403 | |
| 404 | function log(bool p0, uint256 p1, string memory p2) internal pure { |
| 405 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); |
| 406 | } |
| 407 | |
| 408 | function log(bool p0, uint256 p1, bool p2) internal pure { |
| 409 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); |
| 410 | } |
| 411 | |
| 412 | function log(bool p0, uint256 p1, address p2) internal pure { |
| 413 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); |
| 414 | } |
| 415 | |
| 416 | function log(bool p0, string memory p1, uint256 p2) internal pure { |
| 417 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); |
| 418 | } |
| 419 | |
| 420 | function log(bool p0, string memory p1, string memory p2) internal pure { |
| 421 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); |
| 422 | } |
| 423 | |
| 424 | function log(bool p0, string memory p1, bool p2) internal pure { |
| 425 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); |
| 426 | } |
| 427 | |
| 428 | function log(bool p0, string memory p1, address p2) internal pure { |
| 429 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); |
| 430 | } |
| 431 | |
| 432 | function log(bool p0, bool p1, uint256 p2) internal pure { |
| 433 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); |
| 434 | } |
| 435 | |
| 436 | function log(bool p0, bool p1, string memory p2) internal pure { |
| 437 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); |
| 438 | } |
| 439 | |
| 440 | function log(bool p0, bool p1, bool p2) internal pure { |
| 441 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); |
| 442 | } |
| 443 | |
| 444 | function log(bool p0, bool p1, address p2) internal pure { |
| 445 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); |
| 446 | } |
| 447 | |
| 448 | function log(bool p0, address p1, uint256 p2) internal pure { |
| 449 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); |
| 450 | } |
| 451 | |
| 452 | function log(bool p0, address p1, string memory p2) internal pure { |
| 453 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); |
| 454 | } |
| 455 | |
| 456 | function log(bool p0, address p1, bool p2) internal pure { |
| 457 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); |
| 458 | } |
| 459 | |
| 460 | function log(bool p0, address p1, address p2) internal pure { |
| 461 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); |
| 462 | } |
| 463 | |
| 464 | function log(address p0, uint256 p1, uint256 p2) internal pure { |
| 465 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); |
| 466 | } |
| 467 | |
| 468 | function log(address p0, uint256 p1, string memory p2) internal pure { |
| 469 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); |
| 470 | } |
| 471 | |
| 472 | function log(address p0, uint256 p1, bool p2) internal pure { |
| 473 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); |
| 474 | } |
| 475 | |
| 476 | function log(address p0, uint256 p1, address p2) internal pure { |
| 477 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); |
| 478 | } |
| 479 | |
| 480 | function log(address p0, string memory p1, uint256 p2) internal pure { |
| 481 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); |
| 482 | } |
| 483 | |
| 484 | function log(address p0, string memory p1, string memory p2) internal pure { |
| 485 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); |
| 486 | } |
| 487 | |
| 488 | function log(address p0, string memory p1, bool p2) internal pure { |
| 489 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); |
| 490 | } |
| 491 | |
| 492 | function log(address p0, string memory p1, address p2) internal pure { |
| 493 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); |
| 494 | } |
| 495 | |
| 496 | function log(address p0, bool p1, uint256 p2) internal pure { |
| 497 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); |
| 498 | } |
| 499 | |
| 500 | function log(address p0, bool p1, string memory p2) internal pure { |
| 501 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); |
| 502 | } |
| 503 | |
| 504 | function log(address p0, bool p1, bool p2) internal pure { |
| 505 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); |
| 506 | } |
| 507 | |
| 508 | function log(address p0, bool p1, address p2) internal pure { |
| 509 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); |
| 510 | } |
| 511 | |
| 512 | function log(address p0, address p1, uint256 p2) internal pure { |
| 513 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); |
| 514 | } |
| 515 | |
| 516 | function log(address p0, address p1, string memory p2) internal pure { |
| 517 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); |
| 518 | } |
| 519 | |
| 520 | function log(address p0, address p1, bool p2) internal pure { |
| 521 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); |
| 522 | } |
| 523 | |
| 524 | function log(address p0, address p1, address p2) internal pure { |
| 525 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); |
| 526 | } |
| 527 | |
| 528 | function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 529 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); |
| 530 | } |
| 531 | |
| 532 | function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { |
| 533 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); |
| 534 | } |
| 535 | |
| 536 | function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 537 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); |
| 538 | } |
| 539 | |
| 540 | function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 541 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); |
| 542 | } |
| 543 | |
| 544 | function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { |
| 545 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); |
| 546 | } |
| 547 | |
| 548 | function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { |
| 549 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); |
| 550 | } |
| 551 | |
| 552 | function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { |
| 553 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); |
| 554 | } |
| 555 | |
| 556 | function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { |
| 557 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); |
| 558 | } |
| 559 | |
| 560 | function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 561 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); |
| 562 | } |
| 563 | |
| 564 | function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { |
| 565 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); |
| 566 | } |
| 567 | |
| 568 | function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { |
| 569 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); |
| 570 | } |
| 571 | |
| 572 | function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { |
| 573 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); |
| 574 | } |
| 575 | |
| 576 | function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 577 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); |
| 578 | } |
| 579 | |
| 580 | function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { |
| 581 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); |
| 582 | } |
| 583 | |
| 584 | function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { |
| 585 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); |
| 586 | } |
| 587 | |
| 588 | function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { |
| 589 | _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); |
| 590 | } |
| 591 | |
| 592 | function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { |
| 593 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); |
| 594 | } |
| 595 | |
| 596 | function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { |
| 597 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); |
| 598 | } |
| 599 | |
| 600 | function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { |
| 601 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); |
| 602 | } |
| 603 | |
| 604 | function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { |
| 605 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); |
| 606 | } |
| 607 | |
| 608 | function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { |
| 609 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); |
| 610 | } |
| 611 | |
| 612 | function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { |
| 613 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); |
| 614 | } |
| 615 | |
| 616 | function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { |
| 617 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); |
| 618 | } |
| 619 | |
| 620 | function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { |
| 621 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); |
| 622 | } |
| 623 | |
| 624 | function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { |
| 625 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); |
| 626 | } |
| 627 | |
| 628 | function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { |
| 629 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); |
| 630 | } |
| 631 | |
| 632 | function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { |
| 633 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); |
| 634 | } |
| 635 | |
| 636 | function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { |
| 637 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); |
| 638 | } |
| 639 | |
| 640 | function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { |
| 641 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); |
| 642 | } |
| 643 | |
| 644 | function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { |
| 645 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); |
| 646 | } |
| 647 | |
| 648 | function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { |
| 649 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); |
| 650 | } |
| 651 | |
| 652 | function log(uint256 p0, string memory p1, address p2, address p3) internal pure { |
| 653 | _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); |
| 654 | } |
| 655 | |
| 656 | function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 657 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); |
| 658 | } |
| 659 | |
| 660 | function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { |
| 661 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); |
| 662 | } |
| 663 | |
| 664 | function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { |
| 665 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); |
| 666 | } |
| 667 | |
| 668 | function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { |
| 669 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); |
| 670 | } |
| 671 | |
| 672 | function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { |
| 673 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); |
| 674 | } |
| 675 | |
| 676 | function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { |
| 677 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); |
| 678 | } |
| 679 | |
| 680 | function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { |
| 681 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); |
| 682 | } |
| 683 | |
| 684 | function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { |
| 685 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); |
| 686 | } |
| 687 | |
| 688 | function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { |
| 689 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); |
| 690 | } |
| 691 | |
| 692 | function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { |
| 693 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); |
| 694 | } |
| 695 | |
| 696 | function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { |
| 697 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); |
| 698 | } |
| 699 | |
| 700 | function log(uint256 p0, bool p1, bool p2, address p3) internal pure { |
| 701 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); |
| 702 | } |
| 703 | |
| 704 | function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { |
| 705 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); |
| 706 | } |
| 707 | |
| 708 | function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { |
| 709 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); |
| 710 | } |
| 711 | |
| 712 | function log(uint256 p0, bool p1, address p2, bool p3) internal pure { |
| 713 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); |
| 714 | } |
| 715 | |
| 716 | function log(uint256 p0, bool p1, address p2, address p3) internal pure { |
| 717 | _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); |
| 718 | } |
| 719 | |
| 720 | function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 721 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); |
| 722 | } |
| 723 | |
| 724 | function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { |
| 725 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); |
| 726 | } |
| 727 | |
| 728 | function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { |
| 729 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); |
| 730 | } |
| 731 | |
| 732 | function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { |
| 733 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); |
| 734 | } |
| 735 | |
| 736 | function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { |
| 737 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); |
| 738 | } |
| 739 | |
| 740 | function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { |
| 741 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); |
| 742 | } |
| 743 | |
| 744 | function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { |
| 745 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); |
| 746 | } |
| 747 | |
| 748 | function log(uint256 p0, address p1, string memory p2, address p3) internal pure { |
| 749 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); |
| 750 | } |
| 751 | |
| 752 | function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { |
| 753 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); |
| 754 | } |
| 755 | |
| 756 | function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { |
| 757 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); |
| 758 | } |
| 759 | |
| 760 | function log(uint256 p0, address p1, bool p2, bool p3) internal pure { |
| 761 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); |
| 762 | } |
| 763 | |
| 764 | function log(uint256 p0, address p1, bool p2, address p3) internal pure { |
| 765 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); |
| 766 | } |
| 767 | |
| 768 | function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { |
| 769 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); |
| 770 | } |
| 771 | |
| 772 | function log(uint256 p0, address p1, address p2, string memory p3) internal pure { |
| 773 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); |
| 774 | } |
| 775 | |
| 776 | function log(uint256 p0, address p1, address p2, bool p3) internal pure { |
| 777 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); |
| 778 | } |
| 779 | |
| 780 | function log(uint256 p0, address p1, address p2, address p3) internal pure { |
| 781 | _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); |
| 782 | } |
| 783 | |
| 784 | function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 785 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); |
| 786 | } |
| 787 | |
| 788 | function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { |
| 789 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); |
| 790 | } |
| 791 | |
| 792 | function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 793 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); |
| 794 | } |
| 795 | |
| 796 | function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 797 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); |
| 798 | } |
| 799 | |
| 800 | function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { |
| 801 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); |
| 802 | } |
| 803 | |
| 804 | function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { |
| 805 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); |
| 806 | } |
| 807 | |
| 808 | function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { |
| 809 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); |
| 810 | } |
| 811 | |
| 812 | function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { |
| 813 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); |
| 814 | } |
| 815 | |
| 816 | function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 817 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); |
| 818 | } |
| 819 | |
| 820 | function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { |
| 821 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); |
| 822 | } |
| 823 | |
| 824 | function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { |
| 825 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); |
| 826 | } |
| 827 | |
| 828 | function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { |
| 829 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); |
| 830 | } |
| 831 | |
| 832 | function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 833 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); |
| 834 | } |
| 835 | |
| 836 | function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { |
| 837 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); |
| 838 | } |
| 839 | |
| 840 | function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { |
| 841 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); |
| 842 | } |
| 843 | |
| 844 | function log(string memory p0, uint256 p1, address p2, address p3) internal pure { |
| 845 | _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); |
| 846 | } |
| 847 | |
| 848 | function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { |
| 849 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); |
| 850 | } |
| 851 | |
| 852 | function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { |
| 853 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); |
| 854 | } |
| 855 | |
| 856 | function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { |
| 857 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); |
| 858 | } |
| 859 | |
| 860 | function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { |
| 861 | _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); |
| 862 | } |
| 863 | |
| 864 | function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { |
| 865 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); |
| 866 | } |
| 867 | |
| 868 | function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { |
| 869 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); |
| 870 | } |
| 871 | |
| 872 | function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { |
| 873 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); |
| 874 | } |
| 875 | |
| 876 | function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { |
| 877 | _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); |
| 878 | } |
| 879 | |
| 880 | function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { |
| 881 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); |
| 882 | } |
| 883 | |
| 884 | function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { |
| 885 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); |
| 886 | } |
| 887 | |
| 888 | function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { |
| 889 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); |
| 890 | } |
| 891 | |
| 892 | function log(string memory p0, string memory p1, bool p2, address p3) internal pure { |
| 893 | _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); |
| 894 | } |
| 895 | |
| 896 | function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { |
| 897 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); |
| 898 | } |
| 899 | |
| 900 | function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { |
| 901 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); |
| 902 | } |
| 903 | |
| 904 | function log(string memory p0, string memory p1, address p2, bool p3) internal pure { |
| 905 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); |
| 906 | } |
| 907 | |
| 908 | function log(string memory p0, string memory p1, address p2, address p3) internal pure { |
| 909 | _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); |
| 910 | } |
| 911 | |
| 912 | function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 913 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); |
| 914 | } |
| 915 | |
| 916 | function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { |
| 917 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); |
| 918 | } |
| 919 | |
| 920 | function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { |
| 921 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); |
| 922 | } |
| 923 | |
| 924 | function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { |
| 925 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); |
| 926 | } |
| 927 | |
| 928 | function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { |
| 929 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); |
| 930 | } |
| 931 | |
| 932 | function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { |
| 933 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); |
| 934 | } |
| 935 | |
| 936 | function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { |
| 937 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); |
| 938 | } |
| 939 | |
| 940 | function log(string memory p0, bool p1, string memory p2, address p3) internal pure { |
| 941 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); |
| 942 | } |
| 943 | |
| 944 | function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { |
| 945 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); |
| 946 | } |
| 947 | |
| 948 | function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { |
| 949 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); |
| 950 | } |
| 951 | |
| 952 | function log(string memory p0, bool p1, bool p2, bool p3) internal pure { |
| 953 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); |
| 954 | } |
| 955 | |
| 956 | function log(string memory p0, bool p1, bool p2, address p3) internal pure { |
| 957 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); |
| 958 | } |
| 959 | |
| 960 | function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { |
| 961 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); |
| 962 | } |
| 963 | |
| 964 | function log(string memory p0, bool p1, address p2, string memory p3) internal pure { |
| 965 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); |
| 966 | } |
| 967 | |
| 968 | function log(string memory p0, bool p1, address p2, bool p3) internal pure { |
| 969 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); |
| 970 | } |
| 971 | |
| 972 | function log(string memory p0, bool p1, address p2, address p3) internal pure { |
| 973 | _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); |
| 974 | } |
| 975 | |
| 976 | function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 977 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); |
| 978 | } |
| 979 | |
| 980 | function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { |
| 981 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); |
| 982 | } |
| 983 | |
| 984 | function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { |
| 985 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); |
| 986 | } |
| 987 | |
| 988 | function log(string memory p0, address p1, uint256 p2, address p3) internal pure { |
| 989 | _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); |
| 990 | } |
| 991 | |
| 992 | function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { |
| 993 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); |
| 994 | } |
| 995 | |
| 996 | function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { |
| 997 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); |
| 998 | } |
| 999 | |
| 1000 | function log(string memory p0, address p1, string memory p2, bool p3) internal pure { |
| 1001 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); |
| 1002 | } |
| 1003 | |
| 1004 | function log(string memory p0, address p1, string memory p2, address p3) internal pure { |
| 1005 | _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); |
| 1006 | } |
| 1007 | |
| 1008 | function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { |
| 1009 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); |
| 1010 | } |
| 1011 | |
| 1012 | function log(string memory p0, address p1, bool p2, string memory p3) internal pure { |
| 1013 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); |
| 1014 | } |
| 1015 | |
| 1016 | function log(string memory p0, address p1, bool p2, bool p3) internal pure { |
| 1017 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); |
| 1018 | } |
| 1019 | |
| 1020 | function log(string memory p0, address p1, bool p2, address p3) internal pure { |
| 1021 | _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); |
| 1022 | } |
| 1023 | |
| 1024 | function log(string memory p0, address p1, address p2, uint256 p3) internal pure { |
| 1025 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); |
| 1026 | } |
| 1027 | |
| 1028 | function log(string memory p0, address p1, address p2, string memory p3) internal pure { |
| 1029 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); |
| 1030 | } |
| 1031 | |
| 1032 | function log(string memory p0, address p1, address p2, bool p3) internal pure { |
| 1033 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); |
| 1034 | } |
| 1035 | |
| 1036 | function log(string memory p0, address p1, address p2, address p3) internal pure { |
| 1037 | _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); |
| 1038 | } |
| 1039 | |
| 1040 | function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 1041 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); |
| 1042 | } |
| 1043 | |
| 1044 | function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { |
| 1045 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); |
| 1046 | } |
| 1047 | |
| 1048 | function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 1049 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); |
| 1050 | } |
| 1051 | |
| 1052 | function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 1053 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); |
| 1054 | } |
| 1055 | |
| 1056 | function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { |
| 1057 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); |
| 1058 | } |
| 1059 | |
| 1060 | function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { |
| 1061 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); |
| 1062 | } |
| 1063 | |
| 1064 | function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { |
| 1065 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); |
| 1066 | } |
| 1067 | |
| 1068 | function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { |
| 1069 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); |
| 1070 | } |
| 1071 | |
| 1072 | function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 1073 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); |
| 1074 | } |
| 1075 | |
| 1076 | function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { |
| 1077 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); |
| 1078 | } |
| 1079 | |
| 1080 | function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { |
| 1081 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); |
| 1082 | } |
| 1083 | |
| 1084 | function log(bool p0, uint256 p1, bool p2, address p3) internal pure { |
| 1085 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); |
| 1086 | } |
| 1087 | |
| 1088 | function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 1089 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); |
| 1090 | } |
| 1091 | |
| 1092 | function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { |
| 1093 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); |
| 1094 | } |
| 1095 | |
| 1096 | function log(bool p0, uint256 p1, address p2, bool p3) internal pure { |
| 1097 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); |
| 1098 | } |
| 1099 | |
| 1100 | function log(bool p0, uint256 p1, address p2, address p3) internal pure { |
| 1101 | _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); |
| 1102 | } |
| 1103 | |
| 1104 | function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { |
| 1105 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); |
| 1106 | } |
| 1107 | |
| 1108 | function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { |
| 1109 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); |
| 1110 | } |
| 1111 | |
| 1112 | function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { |
| 1113 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); |
| 1114 | } |
| 1115 | |
| 1116 | function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { |
| 1117 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); |
| 1118 | } |
| 1119 | |
| 1120 | function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { |
| 1121 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); |
| 1122 | } |
| 1123 | |
| 1124 | function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { |
| 1125 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); |
| 1126 | } |
| 1127 | |
| 1128 | function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { |
| 1129 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); |
| 1130 | } |
| 1131 | |
| 1132 | function log(bool p0, string memory p1, string memory p2, address p3) internal pure { |
| 1133 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); |
| 1134 | } |
| 1135 | |
| 1136 | function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { |
| 1137 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); |
| 1138 | } |
| 1139 | |
| 1140 | function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { |
| 1141 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); |
| 1142 | } |
| 1143 | |
| 1144 | function log(bool p0, string memory p1, bool p2, bool p3) internal pure { |
| 1145 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); |
| 1146 | } |
| 1147 | |
| 1148 | function log(bool p0, string memory p1, bool p2, address p3) internal pure { |
| 1149 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); |
| 1150 | } |
| 1151 | |
| 1152 | function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { |
| 1153 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); |
| 1154 | } |
| 1155 | |
| 1156 | function log(bool p0, string memory p1, address p2, string memory p3) internal pure { |
| 1157 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); |
| 1158 | } |
| 1159 | |
| 1160 | function log(bool p0, string memory p1, address p2, bool p3) internal pure { |
| 1161 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); |
| 1162 | } |
| 1163 | |
| 1164 | function log(bool p0, string memory p1, address p2, address p3) internal pure { |
| 1165 | _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); |
| 1166 | } |
| 1167 | |
| 1168 | function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 1169 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); |
| 1170 | } |
| 1171 | |
| 1172 | function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { |
| 1173 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); |
| 1174 | } |
| 1175 | |
| 1176 | function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { |
| 1177 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); |
| 1178 | } |
| 1179 | |
| 1180 | function log(bool p0, bool p1, uint256 p2, address p3) internal pure { |
| 1181 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); |
| 1182 | } |
| 1183 | |
| 1184 | function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { |
| 1185 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); |
| 1186 | } |
| 1187 | |
| 1188 | function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { |
| 1189 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); |
| 1190 | } |
| 1191 | |
| 1192 | function log(bool p0, bool p1, string memory p2, bool p3) internal pure { |
| 1193 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); |
| 1194 | } |
| 1195 | |
| 1196 | function log(bool p0, bool p1, string memory p2, address p3) internal pure { |
| 1197 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); |
| 1198 | } |
| 1199 | |
| 1200 | function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { |
| 1201 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); |
| 1202 | } |
| 1203 | |
| 1204 | function log(bool p0, bool p1, bool p2, string memory p3) internal pure { |
| 1205 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); |
| 1206 | } |
| 1207 | |
| 1208 | function log(bool p0, bool p1, bool p2, bool p3) internal pure { |
| 1209 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); |
| 1210 | } |
| 1211 | |
| 1212 | function log(bool p0, bool p1, bool p2, address p3) internal pure { |
| 1213 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); |
| 1214 | } |
| 1215 | |
| 1216 | function log(bool p0, bool p1, address p2, uint256 p3) internal pure { |
| 1217 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); |
| 1218 | } |
| 1219 | |
| 1220 | function log(bool p0, bool p1, address p2, string memory p3) internal pure { |
| 1221 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); |
| 1222 | } |
| 1223 | |
| 1224 | function log(bool p0, bool p1, address p2, bool p3) internal pure { |
| 1225 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); |
| 1226 | } |
| 1227 | |
| 1228 | function log(bool p0, bool p1, address p2, address p3) internal pure { |
| 1229 | _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); |
| 1230 | } |
| 1231 | |
| 1232 | function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 1233 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); |
| 1234 | } |
| 1235 | |
| 1236 | function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { |
| 1237 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); |
| 1238 | } |
| 1239 | |
| 1240 | function log(bool p0, address p1, uint256 p2, bool p3) internal pure { |
| 1241 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); |
| 1242 | } |
| 1243 | |
| 1244 | function log(bool p0, address p1, uint256 p2, address p3) internal pure { |
| 1245 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); |
| 1246 | } |
| 1247 | |
| 1248 | function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { |
| 1249 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); |
| 1250 | } |
| 1251 | |
| 1252 | function log(bool p0, address p1, string memory p2, string memory p3) internal pure { |
| 1253 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); |
| 1254 | } |
| 1255 | |
| 1256 | function log(bool p0, address p1, string memory p2, bool p3) internal pure { |
| 1257 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); |
| 1258 | } |
| 1259 | |
| 1260 | function log(bool p0, address p1, string memory p2, address p3) internal pure { |
| 1261 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); |
| 1262 | } |
| 1263 | |
| 1264 | function log(bool p0, address p1, bool p2, uint256 p3) internal pure { |
| 1265 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); |
| 1266 | } |
| 1267 | |
| 1268 | function log(bool p0, address p1, bool p2, string memory p3) internal pure { |
| 1269 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); |
| 1270 | } |
| 1271 | |
| 1272 | function log(bool p0, address p1, bool p2, bool p3) internal pure { |
| 1273 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); |
| 1274 | } |
| 1275 | |
| 1276 | function log(bool p0, address p1, bool p2, address p3) internal pure { |
| 1277 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); |
| 1278 | } |
| 1279 | |
| 1280 | function log(bool p0, address p1, address p2, uint256 p3) internal pure { |
| 1281 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); |
| 1282 | } |
| 1283 | |
| 1284 | function log(bool p0, address p1, address p2, string memory p3) internal pure { |
| 1285 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); |
| 1286 | } |
| 1287 | |
| 1288 | function log(bool p0, address p1, address p2, bool p3) internal pure { |
| 1289 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); |
| 1290 | } |
| 1291 | |
| 1292 | function log(bool p0, address p1, address p2, address p3) internal pure { |
| 1293 | _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); |
| 1294 | } |
| 1295 | |
| 1296 | function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 1297 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); |
| 1298 | } |
| 1299 | |
| 1300 | function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { |
| 1301 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); |
| 1302 | } |
| 1303 | |
| 1304 | function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 1305 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); |
| 1306 | } |
| 1307 | |
| 1308 | function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 1309 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); |
| 1310 | } |
| 1311 | |
| 1312 | function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { |
| 1313 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); |
| 1314 | } |
| 1315 | |
| 1316 | function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { |
| 1317 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); |
| 1318 | } |
| 1319 | |
| 1320 | function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { |
| 1321 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); |
| 1322 | } |
| 1323 | |
| 1324 | function log(address p0, uint256 p1, string memory p2, address p3) internal pure { |
| 1325 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); |
| 1326 | } |
| 1327 | |
| 1328 | function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 1329 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); |
| 1330 | } |
| 1331 | |
| 1332 | function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { |
| 1333 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); |
| 1334 | } |
| 1335 | |
| 1336 | function log(address p0, uint256 p1, bool p2, bool p3) internal pure { |
| 1337 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); |
| 1338 | } |
| 1339 | |
| 1340 | function log(address p0, uint256 p1, bool p2, address p3) internal pure { |
| 1341 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); |
| 1342 | } |
| 1343 | |
| 1344 | function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 1345 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); |
| 1346 | } |
| 1347 | |
| 1348 | function log(address p0, uint256 p1, address p2, string memory p3) internal pure { |
| 1349 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); |
| 1350 | } |
| 1351 | |
| 1352 | function log(address p0, uint256 p1, address p2, bool p3) internal pure { |
| 1353 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); |
| 1354 | } |
| 1355 | |
| 1356 | function log(address p0, uint256 p1, address p2, address p3) internal pure { |
| 1357 | _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); |
| 1358 | } |
| 1359 | |
| 1360 | function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { |
| 1361 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); |
| 1362 | } |
| 1363 | |
| 1364 | function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { |
| 1365 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); |
| 1366 | } |
| 1367 | |
| 1368 | function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { |
| 1369 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); |
| 1370 | } |
| 1371 | |
| 1372 | function log(address p0, string memory p1, uint256 p2, address p3) internal pure { |
| 1373 | _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); |
| 1374 | } |
| 1375 | |
| 1376 | function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { |
| 1377 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); |
| 1378 | } |
| 1379 | |
| 1380 | function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { |
| 1381 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); |
| 1382 | } |
| 1383 | |
| 1384 | function log(address p0, string memory p1, string memory p2, bool p3) internal pure { |
| 1385 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); |
| 1386 | } |
| 1387 | |
| 1388 | function log(address p0, string memory p1, string memory p2, address p3) internal pure { |
| 1389 | _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); |
| 1390 | } |
| 1391 | |
| 1392 | function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { |
| 1393 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); |
| 1394 | } |
| 1395 | |
| 1396 | function log(address p0, string memory p1, bool p2, string memory p3) internal pure { |
| 1397 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); |
| 1398 | } |
| 1399 | |
| 1400 | function log(address p0, string memory p1, bool p2, bool p3) internal pure { |
| 1401 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); |
| 1402 | } |
| 1403 | |
| 1404 | function log(address p0, string memory p1, bool p2, address p3) internal pure { |
| 1405 | _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); |
| 1406 | } |
| 1407 | |
| 1408 | function log(address p0, string memory p1, address p2, uint256 p3) internal pure { |
| 1409 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); |
| 1410 | } |
| 1411 | |
| 1412 | function log(address p0, string memory p1, address p2, string memory p3) internal pure { |
| 1413 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); |
| 1414 | } |
| 1415 | |
| 1416 | function log(address p0, string memory p1, address p2, bool p3) internal pure { |
| 1417 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); |
| 1418 | } |
| 1419 | |
| 1420 | function log(address p0, string memory p1, address p2, address p3) internal pure { |
| 1421 | _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); |
| 1422 | } |
| 1423 | |
| 1424 | function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 1425 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); |
| 1426 | } |
| 1427 | |
| 1428 | function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { |
| 1429 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); |
| 1430 | } |
| 1431 | |
| 1432 | function log(address p0, bool p1, uint256 p2, bool p3) internal pure { |
| 1433 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); |
| 1434 | } |
| 1435 | |
| 1436 | function log(address p0, bool p1, uint256 p2, address p3) internal pure { |
| 1437 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); |
| 1438 | } |
| 1439 | |
| 1440 | function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { |
| 1441 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); |
| 1442 | } |
| 1443 | |
| 1444 | function log(address p0, bool p1, string memory p2, string memory p3) internal pure { |
| 1445 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); |
| 1446 | } |
| 1447 | |
| 1448 | function log(address p0, bool p1, string memory p2, bool p3) internal pure { |
| 1449 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); |
| 1450 | } |
| 1451 | |
| 1452 | function log(address p0, bool p1, string memory p2, address p3) internal pure { |
| 1453 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); |
| 1454 | } |
| 1455 | |
| 1456 | function log(address p0, bool p1, bool p2, uint256 p3) internal pure { |
| 1457 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); |
| 1458 | } |
| 1459 | |
| 1460 | function log(address p0, bool p1, bool p2, string memory p3) internal pure { |
| 1461 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); |
| 1462 | } |
| 1463 | |
| 1464 | function log(address p0, bool p1, bool p2, bool p3) internal pure { |
| 1465 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); |
| 1466 | } |
| 1467 | |
| 1468 | function log(address p0, bool p1, bool p2, address p3) internal pure { |
| 1469 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); |
| 1470 | } |
| 1471 | |
| 1472 | function log(address p0, bool p1, address p2, uint256 p3) internal pure { |
| 1473 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); |
| 1474 | } |
| 1475 | |
| 1476 | function log(address p0, bool p1, address p2, string memory p3) internal pure { |
| 1477 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); |
| 1478 | } |
| 1479 | |
| 1480 | function log(address p0, bool p1, address p2, bool p3) internal pure { |
| 1481 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); |
| 1482 | } |
| 1483 | |
| 1484 | function log(address p0, bool p1, address p2, address p3) internal pure { |
| 1485 | _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); |
| 1486 | } |
| 1487 | |
| 1488 | function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 1489 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); |
| 1490 | } |
| 1491 | |
| 1492 | function log(address p0, address p1, uint256 p2, string memory p3) internal pure { |
| 1493 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); |
| 1494 | } |
| 1495 | |
| 1496 | function log(address p0, address p1, uint256 p2, bool p3) internal pure { |
| 1497 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); |
| 1498 | } |
| 1499 | |
| 1500 | function log(address p0, address p1, uint256 p2, address p3) internal pure { |
| 1501 | _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); |
| 1502 | } |
| 1503 | |
| 1504 | function log(address p0, address p1, string memory p2, uint256 p3) internal pure { |
| 1505 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); |
| 1506 | } |
| 1507 | |
| 1508 | function log(address p0, address p1, string memory p2, string memory p3) internal pure { |
| 1509 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); |
| 1510 | } |
| 1511 | |
| 1512 | function log(address p0, address p1, string memory p2, bool p3) internal pure { |
| 1513 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); |
| 1514 | } |
| 1515 | |
| 1516 | function log(address p0, address p1, string memory p2, address p3) internal pure { |
| 1517 | _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); |
| 1518 | } |
| 1519 | |
| 1520 | function log(address p0, address p1, bool p2, uint256 p3) internal pure { |
| 1521 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); |
| 1522 | } |
| 1523 | |
| 1524 | function log(address p0, address p1, bool p2, string memory p3) internal pure { |
| 1525 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); |
| 1526 | } |
| 1527 | |
| 1528 | function log(address p0, address p1, bool p2, bool p3) internal pure { |
| 1529 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); |
| 1530 | } |
| 1531 | |
| 1532 | function log(address p0, address p1, bool p2, address p3) internal pure { |
| 1533 | _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); |
| 1534 | } |
| 1535 | |
| 1536 | function log(address p0, address p1, address p2, uint256 p3) internal pure { |
| 1537 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); |
| 1538 | } |
| 1539 | |
| 1540 | function log(address p0, address p1, address p2, string memory p3) internal pure { |
| 1541 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); |
| 1542 | } |
| 1543 | |
| 1544 | function log(address p0, address p1, address p2, bool p3) internal pure { |
| 1545 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); |
| 1546 | } |
| 1547 | |
| 1548 | function log(address p0, address p1, address p2, address p3) internal pure { |
| 1549 | _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); |
| 1550 | } |
| 1551 | } |
| 1552 |
0.0%
lib/forge-std/src/console2.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | import {console as console2} from "./console.sol"; |
| 5 |
0.0%
lib/forge-std/src/interfaces/IMulticall3.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | interface IMulticall3 { |
| 5 | struct Call { |
| 6 | address target; |
| 7 | bytes callData; |
| 8 | } |
| 9 | |
| 10 | struct Call3 { |
| 11 | address target; |
| 12 | bool allowFailure; |
| 13 | bytes callData; |
| 14 | } |
| 15 | |
| 16 | struct Call3Value { |
| 17 | address target; |
| 18 | bool allowFailure; |
| 19 | uint256 value; |
| 20 | bytes callData; |
| 21 | } |
| 22 | |
| 23 | struct Result { |
| 24 | bool success; |
| 25 | bytes returnData; |
| 26 | } |
| 27 | |
| 28 | function aggregate(Call[] calldata calls) external payable returns (uint256 blockNumber, bytes[] memory returnData); |
| 29 | |
| 30 | function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData); |
| 31 | |
| 32 | function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData); |
| 33 | |
| 34 | function blockAndAggregate(Call[] calldata calls) |
| 35 | external |
| 36 | payable |
| 37 | returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); |
| 38 | |
| 39 | function getBasefee() external view returns (uint256 basefee); |
| 40 | |
| 41 | function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash); |
| 42 | |
| 43 | function getBlockNumber() external view returns (uint256 blockNumber); |
| 44 | |
| 45 | function getChainId() external view returns (uint256 chainid); |
| 46 | |
| 47 | function getCurrentBlockCoinbase() external view returns (address coinbase); |
| 48 | |
| 49 | function getCurrentBlockDifficulty() external view returns (uint256 difficulty); |
| 50 | |
| 51 | function getCurrentBlockGasLimit() external view returns (uint256 gaslimit); |
| 52 | |
| 53 | function getCurrentBlockTimestamp() external view returns (uint256 timestamp); |
| 54 | |
| 55 | function getEthBalance(address addr) external view returns (uint256 balance); |
| 56 | |
| 57 | function getLastBlockHash() external view returns (bytes32 blockHash); |
| 58 | |
| 59 | function tryAggregate(bool requireSuccess, Call[] calldata calls) |
| 60 | external |
| 61 | payable |
| 62 | returns (Result[] memory returnData); |
| 63 | |
| 64 | function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) |
| 65 | external |
| 66 | payable |
| 67 | returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); |
| 68 | } |
| 69 |
0.0%
lib/forge-std/src/safeconsole.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | pragma solidity >=0.8.13 <0.9.0; |
| 3 | |
| 4 | /// @author philogy <https://github.com/philogy> |
| 5 | /// @dev Code generated automatically by script. |
| 6 | library safeconsole { |
| 7 | uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67; |
| 8 | |
| 9 | // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374) |
| 10 | // for the view-to-pure log trick. |
| 11 | function _sendLogPayload(uint256 offset, uint256 size) private pure { |
| 12 | function(uint256, uint256) internal view fnIn = _sendLogPayloadView; |
| 13 | function(uint256, uint256) internal pure pureSendLogPayload; |
| 14 | assembly ("memory-safe") { |
| 15 | pureSendLogPayload := fnIn |
| 16 | } |
| 17 | pureSendLogPayload(offset, size); |
| 18 | } |
| 19 | |
| 20 | function _sendLogPayloadView(uint256 offset, uint256 size) private view { |
| 21 | assembly ("memory-safe") { |
| 22 | pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0)) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure { |
| 27 | function(uint256, uint256, uint256) internal view fnIn = _memcopyView; |
| 28 | function(uint256, uint256, uint256) internal pure pureMemcopy; |
| 29 | assembly ("memory-safe") { |
| 30 | pureMemcopy := fnIn |
| 31 | } |
| 32 | pureMemcopy(fromOffset, toOffset, length); |
| 33 | } |
| 34 | |
| 35 | function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view { |
| 36 | assembly ("memory-safe") { |
| 37 | pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length)) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | function logMemory(uint256 offset, uint256 length) internal pure { |
| 42 | if (offset >= 0x60) { |
| 43 | // Sufficient memory before slice to prepare call header. |
| 44 | bytes32 m0; |
| 45 | bytes32 m1; |
| 46 | bytes32 m2; |
| 47 | assembly ("memory-safe") { |
| 48 | m0 := mload(sub(offset, 0x60)) |
| 49 | m1 := mload(sub(offset, 0x40)) |
| 50 | m2 := mload(sub(offset, 0x20)) |
| 51 | // Selector of `log(bytes)`. |
| 52 | mstore(sub(offset, 0x60), 0x0be77f56) |
| 53 | mstore(sub(offset, 0x40), 0x20) |
| 54 | mstore(sub(offset, 0x20), length) |
| 55 | } |
| 56 | _sendLogPayload(offset - 0x44, length + 0x44); |
| 57 | assembly ("memory-safe") { |
| 58 | mstore(sub(offset, 0x60), m0) |
| 59 | mstore(sub(offset, 0x40), m1) |
| 60 | mstore(sub(offset, 0x20), m2) |
| 61 | } |
| 62 | } else { |
| 63 | // Insufficient space, so copy slice forward, add header and reverse. |
| 64 | bytes32 m0; |
| 65 | bytes32 m1; |
| 66 | bytes32 m2; |
| 67 | uint256 endOffset = offset + length; |
| 68 | assembly ("memory-safe") { |
| 69 | m0 := mload(add(endOffset, 0x00)) |
| 70 | m1 := mload(add(endOffset, 0x20)) |
| 71 | m2 := mload(add(endOffset, 0x40)) |
| 72 | } |
| 73 | _memcopy(offset, offset + 0x60, length); |
| 74 | assembly ("memory-safe") { |
| 75 | // Selector of `log(bytes)`. |
| 76 | mstore(add(offset, 0x00), 0x0be77f56) |
| 77 | mstore(add(offset, 0x20), 0x20) |
| 78 | mstore(add(offset, 0x40), length) |
| 79 | } |
| 80 | _sendLogPayload(offset + 0x1c, length + 0x44); |
| 81 | _memcopy(offset + 0x60, offset, length); |
| 82 | assembly ("memory-safe") { |
| 83 | mstore(add(endOffset, 0x00), m0) |
| 84 | mstore(add(endOffset, 0x20), m1) |
| 85 | mstore(add(endOffset, 0x40), m2) |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | function log(address p0) internal pure { |
| 91 | bytes32 m0; |
| 92 | bytes32 m1; |
| 93 | assembly ("memory-safe") { |
| 94 | m0 := mload(0x00) |
| 95 | m1 := mload(0x20) |
| 96 | // Selector of `log(address)`. |
| 97 | mstore(0x00, 0x2c2ecbc2) |
| 98 | mstore(0x20, p0) |
| 99 | } |
| 100 | _sendLogPayload(0x1c, 0x24); |
| 101 | assembly ("memory-safe") { |
| 102 | mstore(0x00, m0) |
| 103 | mstore(0x20, m1) |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | function log(bool p0) internal pure { |
| 108 | bytes32 m0; |
| 109 | bytes32 m1; |
| 110 | assembly ("memory-safe") { |
| 111 | m0 := mload(0x00) |
| 112 | m1 := mload(0x20) |
| 113 | // Selector of `log(bool)`. |
| 114 | mstore(0x00, 0x32458eed) |
| 115 | mstore(0x20, p0) |
| 116 | } |
| 117 | _sendLogPayload(0x1c, 0x24); |
| 118 | assembly ("memory-safe") { |
| 119 | mstore(0x00, m0) |
| 120 | mstore(0x20, m1) |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | function log(uint256 p0) internal pure { |
| 125 | bytes32 m0; |
| 126 | bytes32 m1; |
| 127 | assembly ("memory-safe") { |
| 128 | m0 := mload(0x00) |
| 129 | m1 := mload(0x20) |
| 130 | // Selector of `log(uint256)`. |
| 131 | mstore(0x00, 0xf82c50f1) |
| 132 | mstore(0x20, p0) |
| 133 | } |
| 134 | _sendLogPayload(0x1c, 0x24); |
| 135 | assembly ("memory-safe") { |
| 136 | mstore(0x00, m0) |
| 137 | mstore(0x20, m1) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | function log(bytes32 p0) internal pure { |
| 142 | bytes32 m0; |
| 143 | bytes32 m1; |
| 144 | bytes32 m2; |
| 145 | bytes32 m3; |
| 146 | assembly ("memory-safe") { |
| 147 | function writeString(pos, w) { |
| 148 | let length := 0 |
| 149 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 150 | mstore(pos, length) |
| 151 | let shift := sub(256, shl(3, length)) |
| 152 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 153 | } |
| 154 | m0 := mload(0x00) |
| 155 | m1 := mload(0x20) |
| 156 | m2 := mload(0x40) |
| 157 | m3 := mload(0x60) |
| 158 | // Selector of `log(string)`. |
| 159 | mstore(0x00, 0x41304fac) |
| 160 | mstore(0x20, 0x20) |
| 161 | writeString(0x40, p0) |
| 162 | } |
| 163 | _sendLogPayload(0x1c, 0x64); |
| 164 | assembly ("memory-safe") { |
| 165 | mstore(0x00, m0) |
| 166 | mstore(0x20, m1) |
| 167 | mstore(0x40, m2) |
| 168 | mstore(0x60, m3) |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | function log(address p0, address p1) internal pure { |
| 173 | bytes32 m0; |
| 174 | bytes32 m1; |
| 175 | bytes32 m2; |
| 176 | assembly ("memory-safe") { |
| 177 | m0 := mload(0x00) |
| 178 | m1 := mload(0x20) |
| 179 | m2 := mload(0x40) |
| 180 | // Selector of `log(address,address)`. |
| 181 | mstore(0x00, 0xdaf0d4aa) |
| 182 | mstore(0x20, p0) |
| 183 | mstore(0x40, p1) |
| 184 | } |
| 185 | _sendLogPayload(0x1c, 0x44); |
| 186 | assembly ("memory-safe") { |
| 187 | mstore(0x00, m0) |
| 188 | mstore(0x20, m1) |
| 189 | mstore(0x40, m2) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | function log(address p0, bool p1) internal pure { |
| 194 | bytes32 m0; |
| 195 | bytes32 m1; |
| 196 | bytes32 m2; |
| 197 | assembly ("memory-safe") { |
| 198 | m0 := mload(0x00) |
| 199 | m1 := mload(0x20) |
| 200 | m2 := mload(0x40) |
| 201 | // Selector of `log(address,bool)`. |
| 202 | mstore(0x00, 0x75b605d3) |
| 203 | mstore(0x20, p0) |
| 204 | mstore(0x40, p1) |
| 205 | } |
| 206 | _sendLogPayload(0x1c, 0x44); |
| 207 | assembly ("memory-safe") { |
| 208 | mstore(0x00, m0) |
| 209 | mstore(0x20, m1) |
| 210 | mstore(0x40, m2) |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | function log(address p0, uint256 p1) internal pure { |
| 215 | bytes32 m0; |
| 216 | bytes32 m1; |
| 217 | bytes32 m2; |
| 218 | assembly ("memory-safe") { |
| 219 | m0 := mload(0x00) |
| 220 | m1 := mload(0x20) |
| 221 | m2 := mload(0x40) |
| 222 | // Selector of `log(address,uint256)`. |
| 223 | mstore(0x00, 0x8309e8a8) |
| 224 | mstore(0x20, p0) |
| 225 | mstore(0x40, p1) |
| 226 | } |
| 227 | _sendLogPayload(0x1c, 0x44); |
| 228 | assembly ("memory-safe") { |
| 229 | mstore(0x00, m0) |
| 230 | mstore(0x20, m1) |
| 231 | mstore(0x40, m2) |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | function log(address p0, bytes32 p1) internal pure { |
| 236 | bytes32 m0; |
| 237 | bytes32 m1; |
| 238 | bytes32 m2; |
| 239 | bytes32 m3; |
| 240 | bytes32 m4; |
| 241 | assembly ("memory-safe") { |
| 242 | function writeString(pos, w) { |
| 243 | let length := 0 |
| 244 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 245 | mstore(pos, length) |
| 246 | let shift := sub(256, shl(3, length)) |
| 247 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 248 | } |
| 249 | m0 := mload(0x00) |
| 250 | m1 := mload(0x20) |
| 251 | m2 := mload(0x40) |
| 252 | m3 := mload(0x60) |
| 253 | m4 := mload(0x80) |
| 254 | // Selector of `log(address,string)`. |
| 255 | mstore(0x00, 0x759f86bb) |
| 256 | mstore(0x20, p0) |
| 257 | mstore(0x40, 0x40) |
| 258 | writeString(0x60, p1) |
| 259 | } |
| 260 | _sendLogPayload(0x1c, 0x84); |
| 261 | assembly ("memory-safe") { |
| 262 | mstore(0x00, m0) |
| 263 | mstore(0x20, m1) |
| 264 | mstore(0x40, m2) |
| 265 | mstore(0x60, m3) |
| 266 | mstore(0x80, m4) |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | function log(bool p0, address p1) internal pure { |
| 271 | bytes32 m0; |
| 272 | bytes32 m1; |
| 273 | bytes32 m2; |
| 274 | assembly ("memory-safe") { |
| 275 | m0 := mload(0x00) |
| 276 | m1 := mload(0x20) |
| 277 | m2 := mload(0x40) |
| 278 | // Selector of `log(bool,address)`. |
| 279 | mstore(0x00, 0x853c4849) |
| 280 | mstore(0x20, p0) |
| 281 | mstore(0x40, p1) |
| 282 | } |
| 283 | _sendLogPayload(0x1c, 0x44); |
| 284 | assembly ("memory-safe") { |
| 285 | mstore(0x00, m0) |
| 286 | mstore(0x20, m1) |
| 287 | mstore(0x40, m2) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | function log(bool p0, bool p1) internal pure { |
| 292 | bytes32 m0; |
| 293 | bytes32 m1; |
| 294 | bytes32 m2; |
| 295 | assembly ("memory-safe") { |
| 296 | m0 := mload(0x00) |
| 297 | m1 := mload(0x20) |
| 298 | m2 := mload(0x40) |
| 299 | // Selector of `log(bool,bool)`. |
| 300 | mstore(0x00, 0x2a110e83) |
| 301 | mstore(0x20, p0) |
| 302 | mstore(0x40, p1) |
| 303 | } |
| 304 | _sendLogPayload(0x1c, 0x44); |
| 305 | assembly ("memory-safe") { |
| 306 | mstore(0x00, m0) |
| 307 | mstore(0x20, m1) |
| 308 | mstore(0x40, m2) |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | function log(bool p0, uint256 p1) internal pure { |
| 313 | bytes32 m0; |
| 314 | bytes32 m1; |
| 315 | bytes32 m2; |
| 316 | assembly ("memory-safe") { |
| 317 | m0 := mload(0x00) |
| 318 | m1 := mload(0x20) |
| 319 | m2 := mload(0x40) |
| 320 | // Selector of `log(bool,uint256)`. |
| 321 | mstore(0x00, 0x399174d3) |
| 322 | mstore(0x20, p0) |
| 323 | mstore(0x40, p1) |
| 324 | } |
| 325 | _sendLogPayload(0x1c, 0x44); |
| 326 | assembly ("memory-safe") { |
| 327 | mstore(0x00, m0) |
| 328 | mstore(0x20, m1) |
| 329 | mstore(0x40, m2) |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | function log(bool p0, bytes32 p1) internal pure { |
| 334 | bytes32 m0; |
| 335 | bytes32 m1; |
| 336 | bytes32 m2; |
| 337 | bytes32 m3; |
| 338 | bytes32 m4; |
| 339 | assembly ("memory-safe") { |
| 340 | function writeString(pos, w) { |
| 341 | let length := 0 |
| 342 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 343 | mstore(pos, length) |
| 344 | let shift := sub(256, shl(3, length)) |
| 345 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 346 | } |
| 347 | m0 := mload(0x00) |
| 348 | m1 := mload(0x20) |
| 349 | m2 := mload(0x40) |
| 350 | m3 := mload(0x60) |
| 351 | m4 := mload(0x80) |
| 352 | // Selector of `log(bool,string)`. |
| 353 | mstore(0x00, 0x8feac525) |
| 354 | mstore(0x20, p0) |
| 355 | mstore(0x40, 0x40) |
| 356 | writeString(0x60, p1) |
| 357 | } |
| 358 | _sendLogPayload(0x1c, 0x84); |
| 359 | assembly ("memory-safe") { |
| 360 | mstore(0x00, m0) |
| 361 | mstore(0x20, m1) |
| 362 | mstore(0x40, m2) |
| 363 | mstore(0x60, m3) |
| 364 | mstore(0x80, m4) |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | function log(uint256 p0, address p1) internal pure { |
| 369 | bytes32 m0; |
| 370 | bytes32 m1; |
| 371 | bytes32 m2; |
| 372 | assembly ("memory-safe") { |
| 373 | m0 := mload(0x00) |
| 374 | m1 := mload(0x20) |
| 375 | m2 := mload(0x40) |
| 376 | // Selector of `log(uint256,address)`. |
| 377 | mstore(0x00, 0x69276c86) |
| 378 | mstore(0x20, p0) |
| 379 | mstore(0x40, p1) |
| 380 | } |
| 381 | _sendLogPayload(0x1c, 0x44); |
| 382 | assembly ("memory-safe") { |
| 383 | mstore(0x00, m0) |
| 384 | mstore(0x20, m1) |
| 385 | mstore(0x40, m2) |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | function log(uint256 p0, bool p1) internal pure { |
| 390 | bytes32 m0; |
| 391 | bytes32 m1; |
| 392 | bytes32 m2; |
| 393 | assembly ("memory-safe") { |
| 394 | m0 := mload(0x00) |
| 395 | m1 := mload(0x20) |
| 396 | m2 := mload(0x40) |
| 397 | // Selector of `log(uint256,bool)`. |
| 398 | mstore(0x00, 0x1c9d7eb3) |
| 399 | mstore(0x20, p0) |
| 400 | mstore(0x40, p1) |
| 401 | } |
| 402 | _sendLogPayload(0x1c, 0x44); |
| 403 | assembly ("memory-safe") { |
| 404 | mstore(0x00, m0) |
| 405 | mstore(0x20, m1) |
| 406 | mstore(0x40, m2) |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | function log(uint256 p0, uint256 p1) internal pure { |
| 411 | bytes32 m0; |
| 412 | bytes32 m1; |
| 413 | bytes32 m2; |
| 414 | assembly ("memory-safe") { |
| 415 | m0 := mload(0x00) |
| 416 | m1 := mload(0x20) |
| 417 | m2 := mload(0x40) |
| 418 | // Selector of `log(uint256,uint256)`. |
| 419 | mstore(0x00, 0xf666715a) |
| 420 | mstore(0x20, p0) |
| 421 | mstore(0x40, p1) |
| 422 | } |
| 423 | _sendLogPayload(0x1c, 0x44); |
| 424 | assembly ("memory-safe") { |
| 425 | mstore(0x00, m0) |
| 426 | mstore(0x20, m1) |
| 427 | mstore(0x40, m2) |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | function log(uint256 p0, bytes32 p1) internal pure { |
| 432 | bytes32 m0; |
| 433 | bytes32 m1; |
| 434 | bytes32 m2; |
| 435 | bytes32 m3; |
| 436 | bytes32 m4; |
| 437 | assembly ("memory-safe") { |
| 438 | function writeString(pos, w) { |
| 439 | let length := 0 |
| 440 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 441 | mstore(pos, length) |
| 442 | let shift := sub(256, shl(3, length)) |
| 443 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 444 | } |
| 445 | m0 := mload(0x00) |
| 446 | m1 := mload(0x20) |
| 447 | m2 := mload(0x40) |
| 448 | m3 := mload(0x60) |
| 449 | m4 := mload(0x80) |
| 450 | // Selector of `log(uint256,string)`. |
| 451 | mstore(0x00, 0x643fd0df) |
| 452 | mstore(0x20, p0) |
| 453 | mstore(0x40, 0x40) |
| 454 | writeString(0x60, p1) |
| 455 | } |
| 456 | _sendLogPayload(0x1c, 0x84); |
| 457 | assembly ("memory-safe") { |
| 458 | mstore(0x00, m0) |
| 459 | mstore(0x20, m1) |
| 460 | mstore(0x40, m2) |
| 461 | mstore(0x60, m3) |
| 462 | mstore(0x80, m4) |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | function log(bytes32 p0, address p1) internal pure { |
| 467 | bytes32 m0; |
| 468 | bytes32 m1; |
| 469 | bytes32 m2; |
| 470 | bytes32 m3; |
| 471 | bytes32 m4; |
| 472 | assembly ("memory-safe") { |
| 473 | function writeString(pos, w) { |
| 474 | let length := 0 |
| 475 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 476 | mstore(pos, length) |
| 477 | let shift := sub(256, shl(3, length)) |
| 478 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 479 | } |
| 480 | m0 := mload(0x00) |
| 481 | m1 := mload(0x20) |
| 482 | m2 := mload(0x40) |
| 483 | m3 := mload(0x60) |
| 484 | m4 := mload(0x80) |
| 485 | // Selector of `log(string,address)`. |
| 486 | mstore(0x00, 0x319af333) |
| 487 | mstore(0x20, 0x40) |
| 488 | mstore(0x40, p1) |
| 489 | writeString(0x60, p0) |
| 490 | } |
| 491 | _sendLogPayload(0x1c, 0x84); |
| 492 | assembly ("memory-safe") { |
| 493 | mstore(0x00, m0) |
| 494 | mstore(0x20, m1) |
| 495 | mstore(0x40, m2) |
| 496 | mstore(0x60, m3) |
| 497 | mstore(0x80, m4) |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | function log(bytes32 p0, bool p1) internal pure { |
| 502 | bytes32 m0; |
| 503 | bytes32 m1; |
| 504 | bytes32 m2; |
| 505 | bytes32 m3; |
| 506 | bytes32 m4; |
| 507 | assembly ("memory-safe") { |
| 508 | function writeString(pos, w) { |
| 509 | let length := 0 |
| 510 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 511 | mstore(pos, length) |
| 512 | let shift := sub(256, shl(3, length)) |
| 513 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 514 | } |
| 515 | m0 := mload(0x00) |
| 516 | m1 := mload(0x20) |
| 517 | m2 := mload(0x40) |
| 518 | m3 := mload(0x60) |
| 519 | m4 := mload(0x80) |
| 520 | // Selector of `log(string,bool)`. |
| 521 | mstore(0x00, 0xc3b55635) |
| 522 | mstore(0x20, 0x40) |
| 523 | mstore(0x40, p1) |
| 524 | writeString(0x60, p0) |
| 525 | } |
| 526 | _sendLogPayload(0x1c, 0x84); |
| 527 | assembly ("memory-safe") { |
| 528 | mstore(0x00, m0) |
| 529 | mstore(0x20, m1) |
| 530 | mstore(0x40, m2) |
| 531 | mstore(0x60, m3) |
| 532 | mstore(0x80, m4) |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | function log(bytes32 p0, uint256 p1) internal pure { |
| 537 | bytes32 m0; |
| 538 | bytes32 m1; |
| 539 | bytes32 m2; |
| 540 | bytes32 m3; |
| 541 | bytes32 m4; |
| 542 | assembly ("memory-safe") { |
| 543 | function writeString(pos, w) { |
| 544 | let length := 0 |
| 545 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 546 | mstore(pos, length) |
| 547 | let shift := sub(256, shl(3, length)) |
| 548 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 549 | } |
| 550 | m0 := mload(0x00) |
| 551 | m1 := mload(0x20) |
| 552 | m2 := mload(0x40) |
| 553 | m3 := mload(0x60) |
| 554 | m4 := mload(0x80) |
| 555 | // Selector of `log(string,uint256)`. |
| 556 | mstore(0x00, 0xb60e72cc) |
| 557 | mstore(0x20, 0x40) |
| 558 | mstore(0x40, p1) |
| 559 | writeString(0x60, p0) |
| 560 | } |
| 561 | _sendLogPayload(0x1c, 0x84); |
| 562 | assembly ("memory-safe") { |
| 563 | mstore(0x00, m0) |
| 564 | mstore(0x20, m1) |
| 565 | mstore(0x40, m2) |
| 566 | mstore(0x60, m3) |
| 567 | mstore(0x80, m4) |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | function log(bytes32 p0, bytes32 p1) internal pure { |
| 572 | bytes32 m0; |
| 573 | bytes32 m1; |
| 574 | bytes32 m2; |
| 575 | bytes32 m3; |
| 576 | bytes32 m4; |
| 577 | bytes32 m5; |
| 578 | bytes32 m6; |
| 579 | assembly ("memory-safe") { |
| 580 | function writeString(pos, w) { |
| 581 | let length := 0 |
| 582 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 583 | mstore(pos, length) |
| 584 | let shift := sub(256, shl(3, length)) |
| 585 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 586 | } |
| 587 | m0 := mload(0x00) |
| 588 | m1 := mload(0x20) |
| 589 | m2 := mload(0x40) |
| 590 | m3 := mload(0x60) |
| 591 | m4 := mload(0x80) |
| 592 | m5 := mload(0xa0) |
| 593 | m6 := mload(0xc0) |
| 594 | // Selector of `log(string,string)`. |
| 595 | mstore(0x00, 0x4b5c4277) |
| 596 | mstore(0x20, 0x40) |
| 597 | mstore(0x40, 0x80) |
| 598 | writeString(0x60, p0) |
| 599 | writeString(0xa0, p1) |
| 600 | } |
| 601 | _sendLogPayload(0x1c, 0xc4); |
| 602 | assembly ("memory-safe") { |
| 603 | mstore(0x00, m0) |
| 604 | mstore(0x20, m1) |
| 605 | mstore(0x40, m2) |
| 606 | mstore(0x60, m3) |
| 607 | mstore(0x80, m4) |
| 608 | mstore(0xa0, m5) |
| 609 | mstore(0xc0, m6) |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | function log(address p0, address p1, address p2) internal pure { |
| 614 | bytes32 m0; |
| 615 | bytes32 m1; |
| 616 | bytes32 m2; |
| 617 | bytes32 m3; |
| 618 | assembly ("memory-safe") { |
| 619 | m0 := mload(0x00) |
| 620 | m1 := mload(0x20) |
| 621 | m2 := mload(0x40) |
| 622 | m3 := mload(0x60) |
| 623 | // Selector of `log(address,address,address)`. |
| 624 | mstore(0x00, 0x018c84c2) |
| 625 | mstore(0x20, p0) |
| 626 | mstore(0x40, p1) |
| 627 | mstore(0x60, p2) |
| 628 | } |
| 629 | _sendLogPayload(0x1c, 0x64); |
| 630 | assembly ("memory-safe") { |
| 631 | mstore(0x00, m0) |
| 632 | mstore(0x20, m1) |
| 633 | mstore(0x40, m2) |
| 634 | mstore(0x60, m3) |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | function log(address p0, address p1, bool p2) internal pure { |
| 639 | bytes32 m0; |
| 640 | bytes32 m1; |
| 641 | bytes32 m2; |
| 642 | bytes32 m3; |
| 643 | assembly ("memory-safe") { |
| 644 | m0 := mload(0x00) |
| 645 | m1 := mload(0x20) |
| 646 | m2 := mload(0x40) |
| 647 | m3 := mload(0x60) |
| 648 | // Selector of `log(address,address,bool)`. |
| 649 | mstore(0x00, 0xf2a66286) |
| 650 | mstore(0x20, p0) |
| 651 | mstore(0x40, p1) |
| 652 | mstore(0x60, p2) |
| 653 | } |
| 654 | _sendLogPayload(0x1c, 0x64); |
| 655 | assembly ("memory-safe") { |
| 656 | mstore(0x00, m0) |
| 657 | mstore(0x20, m1) |
| 658 | mstore(0x40, m2) |
| 659 | mstore(0x60, m3) |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | function log(address p0, address p1, uint256 p2) internal pure { |
| 664 | bytes32 m0; |
| 665 | bytes32 m1; |
| 666 | bytes32 m2; |
| 667 | bytes32 m3; |
| 668 | assembly ("memory-safe") { |
| 669 | m0 := mload(0x00) |
| 670 | m1 := mload(0x20) |
| 671 | m2 := mload(0x40) |
| 672 | m3 := mload(0x60) |
| 673 | // Selector of `log(address,address,uint256)`. |
| 674 | mstore(0x00, 0x17fe6185) |
| 675 | mstore(0x20, p0) |
| 676 | mstore(0x40, p1) |
| 677 | mstore(0x60, p2) |
| 678 | } |
| 679 | _sendLogPayload(0x1c, 0x64); |
| 680 | assembly ("memory-safe") { |
| 681 | mstore(0x00, m0) |
| 682 | mstore(0x20, m1) |
| 683 | mstore(0x40, m2) |
| 684 | mstore(0x60, m3) |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | function log(address p0, address p1, bytes32 p2) internal pure { |
| 689 | bytes32 m0; |
| 690 | bytes32 m1; |
| 691 | bytes32 m2; |
| 692 | bytes32 m3; |
| 693 | bytes32 m4; |
| 694 | bytes32 m5; |
| 695 | assembly ("memory-safe") { |
| 696 | function writeString(pos, w) { |
| 697 | let length := 0 |
| 698 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 699 | mstore(pos, length) |
| 700 | let shift := sub(256, shl(3, length)) |
| 701 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 702 | } |
| 703 | m0 := mload(0x00) |
| 704 | m1 := mload(0x20) |
| 705 | m2 := mload(0x40) |
| 706 | m3 := mload(0x60) |
| 707 | m4 := mload(0x80) |
| 708 | m5 := mload(0xa0) |
| 709 | // Selector of `log(address,address,string)`. |
| 710 | mstore(0x00, 0x007150be) |
| 711 | mstore(0x20, p0) |
| 712 | mstore(0x40, p1) |
| 713 | mstore(0x60, 0x60) |
| 714 | writeString(0x80, p2) |
| 715 | } |
| 716 | _sendLogPayload(0x1c, 0xa4); |
| 717 | assembly ("memory-safe") { |
| 718 | mstore(0x00, m0) |
| 719 | mstore(0x20, m1) |
| 720 | mstore(0x40, m2) |
| 721 | mstore(0x60, m3) |
| 722 | mstore(0x80, m4) |
| 723 | mstore(0xa0, m5) |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | function log(address p0, bool p1, address p2) internal pure { |
| 728 | bytes32 m0; |
| 729 | bytes32 m1; |
| 730 | bytes32 m2; |
| 731 | bytes32 m3; |
| 732 | assembly ("memory-safe") { |
| 733 | m0 := mload(0x00) |
| 734 | m1 := mload(0x20) |
| 735 | m2 := mload(0x40) |
| 736 | m3 := mload(0x60) |
| 737 | // Selector of `log(address,bool,address)`. |
| 738 | mstore(0x00, 0xf11699ed) |
| 739 | mstore(0x20, p0) |
| 740 | mstore(0x40, p1) |
| 741 | mstore(0x60, p2) |
| 742 | } |
| 743 | _sendLogPayload(0x1c, 0x64); |
| 744 | assembly ("memory-safe") { |
| 745 | mstore(0x00, m0) |
| 746 | mstore(0x20, m1) |
| 747 | mstore(0x40, m2) |
| 748 | mstore(0x60, m3) |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | function log(address p0, bool p1, bool p2) internal pure { |
| 753 | bytes32 m0; |
| 754 | bytes32 m1; |
| 755 | bytes32 m2; |
| 756 | bytes32 m3; |
| 757 | assembly ("memory-safe") { |
| 758 | m0 := mload(0x00) |
| 759 | m1 := mload(0x20) |
| 760 | m2 := mload(0x40) |
| 761 | m3 := mload(0x60) |
| 762 | // Selector of `log(address,bool,bool)`. |
| 763 | mstore(0x00, 0xeb830c92) |
| 764 | mstore(0x20, p0) |
| 765 | mstore(0x40, p1) |
| 766 | mstore(0x60, p2) |
| 767 | } |
| 768 | _sendLogPayload(0x1c, 0x64); |
| 769 | assembly ("memory-safe") { |
| 770 | mstore(0x00, m0) |
| 771 | mstore(0x20, m1) |
| 772 | mstore(0x40, m2) |
| 773 | mstore(0x60, m3) |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | function log(address p0, bool p1, uint256 p2) internal pure { |
| 778 | bytes32 m0; |
| 779 | bytes32 m1; |
| 780 | bytes32 m2; |
| 781 | bytes32 m3; |
| 782 | assembly ("memory-safe") { |
| 783 | m0 := mload(0x00) |
| 784 | m1 := mload(0x20) |
| 785 | m2 := mload(0x40) |
| 786 | m3 := mload(0x60) |
| 787 | // Selector of `log(address,bool,uint256)`. |
| 788 | mstore(0x00, 0x9c4f99fb) |
| 789 | mstore(0x20, p0) |
| 790 | mstore(0x40, p1) |
| 791 | mstore(0x60, p2) |
| 792 | } |
| 793 | _sendLogPayload(0x1c, 0x64); |
| 794 | assembly ("memory-safe") { |
| 795 | mstore(0x00, m0) |
| 796 | mstore(0x20, m1) |
| 797 | mstore(0x40, m2) |
| 798 | mstore(0x60, m3) |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | function log(address p0, bool p1, bytes32 p2) internal pure { |
| 803 | bytes32 m0; |
| 804 | bytes32 m1; |
| 805 | bytes32 m2; |
| 806 | bytes32 m3; |
| 807 | bytes32 m4; |
| 808 | bytes32 m5; |
| 809 | assembly ("memory-safe") { |
| 810 | function writeString(pos, w) { |
| 811 | let length := 0 |
| 812 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 813 | mstore(pos, length) |
| 814 | let shift := sub(256, shl(3, length)) |
| 815 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 816 | } |
| 817 | m0 := mload(0x00) |
| 818 | m1 := mload(0x20) |
| 819 | m2 := mload(0x40) |
| 820 | m3 := mload(0x60) |
| 821 | m4 := mload(0x80) |
| 822 | m5 := mload(0xa0) |
| 823 | // Selector of `log(address,bool,string)`. |
| 824 | mstore(0x00, 0x212255cc) |
| 825 | mstore(0x20, p0) |
| 826 | mstore(0x40, p1) |
| 827 | mstore(0x60, 0x60) |
| 828 | writeString(0x80, p2) |
| 829 | } |
| 830 | _sendLogPayload(0x1c, 0xa4); |
| 831 | assembly ("memory-safe") { |
| 832 | mstore(0x00, m0) |
| 833 | mstore(0x20, m1) |
| 834 | mstore(0x40, m2) |
| 835 | mstore(0x60, m3) |
| 836 | mstore(0x80, m4) |
| 837 | mstore(0xa0, m5) |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | function log(address p0, uint256 p1, address p2) internal pure { |
| 842 | bytes32 m0; |
| 843 | bytes32 m1; |
| 844 | bytes32 m2; |
| 845 | bytes32 m3; |
| 846 | assembly ("memory-safe") { |
| 847 | m0 := mload(0x00) |
| 848 | m1 := mload(0x20) |
| 849 | m2 := mload(0x40) |
| 850 | m3 := mload(0x60) |
| 851 | // Selector of `log(address,uint256,address)`. |
| 852 | mstore(0x00, 0x7bc0d848) |
| 853 | mstore(0x20, p0) |
| 854 | mstore(0x40, p1) |
| 855 | mstore(0x60, p2) |
| 856 | } |
| 857 | _sendLogPayload(0x1c, 0x64); |
| 858 | assembly ("memory-safe") { |
| 859 | mstore(0x00, m0) |
| 860 | mstore(0x20, m1) |
| 861 | mstore(0x40, m2) |
| 862 | mstore(0x60, m3) |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | function log(address p0, uint256 p1, bool p2) internal pure { |
| 867 | bytes32 m0; |
| 868 | bytes32 m1; |
| 869 | bytes32 m2; |
| 870 | bytes32 m3; |
| 871 | assembly ("memory-safe") { |
| 872 | m0 := mload(0x00) |
| 873 | m1 := mload(0x20) |
| 874 | m2 := mload(0x40) |
| 875 | m3 := mload(0x60) |
| 876 | // Selector of `log(address,uint256,bool)`. |
| 877 | mstore(0x00, 0x678209a8) |
| 878 | mstore(0x20, p0) |
| 879 | mstore(0x40, p1) |
| 880 | mstore(0x60, p2) |
| 881 | } |
| 882 | _sendLogPayload(0x1c, 0x64); |
| 883 | assembly ("memory-safe") { |
| 884 | mstore(0x00, m0) |
| 885 | mstore(0x20, m1) |
| 886 | mstore(0x40, m2) |
| 887 | mstore(0x60, m3) |
| 888 | } |
| 889 | } |
| 890 | |
| 891 | function log(address p0, uint256 p1, uint256 p2) internal pure { |
| 892 | bytes32 m0; |
| 893 | bytes32 m1; |
| 894 | bytes32 m2; |
| 895 | bytes32 m3; |
| 896 | assembly ("memory-safe") { |
| 897 | m0 := mload(0x00) |
| 898 | m1 := mload(0x20) |
| 899 | m2 := mload(0x40) |
| 900 | m3 := mload(0x60) |
| 901 | // Selector of `log(address,uint256,uint256)`. |
| 902 | mstore(0x00, 0xb69bcaf6) |
| 903 | mstore(0x20, p0) |
| 904 | mstore(0x40, p1) |
| 905 | mstore(0x60, p2) |
| 906 | } |
| 907 | _sendLogPayload(0x1c, 0x64); |
| 908 | assembly ("memory-safe") { |
| 909 | mstore(0x00, m0) |
| 910 | mstore(0x20, m1) |
| 911 | mstore(0x40, m2) |
| 912 | mstore(0x60, m3) |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | function log(address p0, uint256 p1, bytes32 p2) internal pure { |
| 917 | bytes32 m0; |
| 918 | bytes32 m1; |
| 919 | bytes32 m2; |
| 920 | bytes32 m3; |
| 921 | bytes32 m4; |
| 922 | bytes32 m5; |
| 923 | assembly ("memory-safe") { |
| 924 | function writeString(pos, w) { |
| 925 | let length := 0 |
| 926 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 927 | mstore(pos, length) |
| 928 | let shift := sub(256, shl(3, length)) |
| 929 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 930 | } |
| 931 | m0 := mload(0x00) |
| 932 | m1 := mload(0x20) |
| 933 | m2 := mload(0x40) |
| 934 | m3 := mload(0x60) |
| 935 | m4 := mload(0x80) |
| 936 | m5 := mload(0xa0) |
| 937 | // Selector of `log(address,uint256,string)`. |
| 938 | mstore(0x00, 0xa1f2e8aa) |
| 939 | mstore(0x20, p0) |
| 940 | mstore(0x40, p1) |
| 941 | mstore(0x60, 0x60) |
| 942 | writeString(0x80, p2) |
| 943 | } |
| 944 | _sendLogPayload(0x1c, 0xa4); |
| 945 | assembly ("memory-safe") { |
| 946 | mstore(0x00, m0) |
| 947 | mstore(0x20, m1) |
| 948 | mstore(0x40, m2) |
| 949 | mstore(0x60, m3) |
| 950 | mstore(0x80, m4) |
| 951 | mstore(0xa0, m5) |
| 952 | } |
| 953 | } |
| 954 | |
| 955 | function log(address p0, bytes32 p1, address p2) internal pure { |
| 956 | bytes32 m0; |
| 957 | bytes32 m1; |
| 958 | bytes32 m2; |
| 959 | bytes32 m3; |
| 960 | bytes32 m4; |
| 961 | bytes32 m5; |
| 962 | assembly ("memory-safe") { |
| 963 | function writeString(pos, w) { |
| 964 | let length := 0 |
| 965 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 966 | mstore(pos, length) |
| 967 | let shift := sub(256, shl(3, length)) |
| 968 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 969 | } |
| 970 | m0 := mload(0x00) |
| 971 | m1 := mload(0x20) |
| 972 | m2 := mload(0x40) |
| 973 | m3 := mload(0x60) |
| 974 | m4 := mload(0x80) |
| 975 | m5 := mload(0xa0) |
| 976 | // Selector of `log(address,string,address)`. |
| 977 | mstore(0x00, 0xf08744e8) |
| 978 | mstore(0x20, p0) |
| 979 | mstore(0x40, 0x60) |
| 980 | mstore(0x60, p2) |
| 981 | writeString(0x80, p1) |
| 982 | } |
| 983 | _sendLogPayload(0x1c, 0xa4); |
| 984 | assembly ("memory-safe") { |
| 985 | mstore(0x00, m0) |
| 986 | mstore(0x20, m1) |
| 987 | mstore(0x40, m2) |
| 988 | mstore(0x60, m3) |
| 989 | mstore(0x80, m4) |
| 990 | mstore(0xa0, m5) |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | function log(address p0, bytes32 p1, bool p2) internal pure { |
| 995 | bytes32 m0; |
| 996 | bytes32 m1; |
| 997 | bytes32 m2; |
| 998 | bytes32 m3; |
| 999 | bytes32 m4; |
| 1000 | bytes32 m5; |
| 1001 | assembly ("memory-safe") { |
| 1002 | function writeString(pos, w) { |
| 1003 | let length := 0 |
| 1004 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1005 | mstore(pos, length) |
| 1006 | let shift := sub(256, shl(3, length)) |
| 1007 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1008 | } |
| 1009 | m0 := mload(0x00) |
| 1010 | m1 := mload(0x20) |
| 1011 | m2 := mload(0x40) |
| 1012 | m3 := mload(0x60) |
| 1013 | m4 := mload(0x80) |
| 1014 | m5 := mload(0xa0) |
| 1015 | // Selector of `log(address,string,bool)`. |
| 1016 | mstore(0x00, 0xcf020fb1) |
| 1017 | mstore(0x20, p0) |
| 1018 | mstore(0x40, 0x60) |
| 1019 | mstore(0x60, p2) |
| 1020 | writeString(0x80, p1) |
| 1021 | } |
| 1022 | _sendLogPayload(0x1c, 0xa4); |
| 1023 | assembly ("memory-safe") { |
| 1024 | mstore(0x00, m0) |
| 1025 | mstore(0x20, m1) |
| 1026 | mstore(0x40, m2) |
| 1027 | mstore(0x60, m3) |
| 1028 | mstore(0x80, m4) |
| 1029 | mstore(0xa0, m5) |
| 1030 | } |
| 1031 | } |
| 1032 | |
| 1033 | function log(address p0, bytes32 p1, uint256 p2) internal pure { |
| 1034 | bytes32 m0; |
| 1035 | bytes32 m1; |
| 1036 | bytes32 m2; |
| 1037 | bytes32 m3; |
| 1038 | bytes32 m4; |
| 1039 | bytes32 m5; |
| 1040 | assembly ("memory-safe") { |
| 1041 | function writeString(pos, w) { |
| 1042 | let length := 0 |
| 1043 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1044 | mstore(pos, length) |
| 1045 | let shift := sub(256, shl(3, length)) |
| 1046 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1047 | } |
| 1048 | m0 := mload(0x00) |
| 1049 | m1 := mload(0x20) |
| 1050 | m2 := mload(0x40) |
| 1051 | m3 := mload(0x60) |
| 1052 | m4 := mload(0x80) |
| 1053 | m5 := mload(0xa0) |
| 1054 | // Selector of `log(address,string,uint256)`. |
| 1055 | mstore(0x00, 0x67dd6ff1) |
| 1056 | mstore(0x20, p0) |
| 1057 | mstore(0x40, 0x60) |
| 1058 | mstore(0x60, p2) |
| 1059 | writeString(0x80, p1) |
| 1060 | } |
| 1061 | _sendLogPayload(0x1c, 0xa4); |
| 1062 | assembly ("memory-safe") { |
| 1063 | mstore(0x00, m0) |
| 1064 | mstore(0x20, m1) |
| 1065 | mstore(0x40, m2) |
| 1066 | mstore(0x60, m3) |
| 1067 | mstore(0x80, m4) |
| 1068 | mstore(0xa0, m5) |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | function log(address p0, bytes32 p1, bytes32 p2) internal pure { |
| 1073 | bytes32 m0; |
| 1074 | bytes32 m1; |
| 1075 | bytes32 m2; |
| 1076 | bytes32 m3; |
| 1077 | bytes32 m4; |
| 1078 | bytes32 m5; |
| 1079 | bytes32 m6; |
| 1080 | bytes32 m7; |
| 1081 | assembly ("memory-safe") { |
| 1082 | function writeString(pos, w) { |
| 1083 | let length := 0 |
| 1084 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1085 | mstore(pos, length) |
| 1086 | let shift := sub(256, shl(3, length)) |
| 1087 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1088 | } |
| 1089 | m0 := mload(0x00) |
| 1090 | m1 := mload(0x20) |
| 1091 | m2 := mload(0x40) |
| 1092 | m3 := mload(0x60) |
| 1093 | m4 := mload(0x80) |
| 1094 | m5 := mload(0xa0) |
| 1095 | m6 := mload(0xc0) |
| 1096 | m7 := mload(0xe0) |
| 1097 | // Selector of `log(address,string,string)`. |
| 1098 | mstore(0x00, 0xfb772265) |
| 1099 | mstore(0x20, p0) |
| 1100 | mstore(0x40, 0x60) |
| 1101 | mstore(0x60, 0xa0) |
| 1102 | writeString(0x80, p1) |
| 1103 | writeString(0xc0, p2) |
| 1104 | } |
| 1105 | _sendLogPayload(0x1c, 0xe4); |
| 1106 | assembly ("memory-safe") { |
| 1107 | mstore(0x00, m0) |
| 1108 | mstore(0x20, m1) |
| 1109 | mstore(0x40, m2) |
| 1110 | mstore(0x60, m3) |
| 1111 | mstore(0x80, m4) |
| 1112 | mstore(0xa0, m5) |
| 1113 | mstore(0xc0, m6) |
| 1114 | mstore(0xe0, m7) |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | function log(bool p0, address p1, address p2) internal pure { |
| 1119 | bytes32 m0; |
| 1120 | bytes32 m1; |
| 1121 | bytes32 m2; |
| 1122 | bytes32 m3; |
| 1123 | assembly ("memory-safe") { |
| 1124 | m0 := mload(0x00) |
| 1125 | m1 := mload(0x20) |
| 1126 | m2 := mload(0x40) |
| 1127 | m3 := mload(0x60) |
| 1128 | // Selector of `log(bool,address,address)`. |
| 1129 | mstore(0x00, 0xd2763667) |
| 1130 | mstore(0x20, p0) |
| 1131 | mstore(0x40, p1) |
| 1132 | mstore(0x60, p2) |
| 1133 | } |
| 1134 | _sendLogPayload(0x1c, 0x64); |
| 1135 | assembly ("memory-safe") { |
| 1136 | mstore(0x00, m0) |
| 1137 | mstore(0x20, m1) |
| 1138 | mstore(0x40, m2) |
| 1139 | mstore(0x60, m3) |
| 1140 | } |
| 1141 | } |
| 1142 | |
| 1143 | function log(bool p0, address p1, bool p2) internal pure { |
| 1144 | bytes32 m0; |
| 1145 | bytes32 m1; |
| 1146 | bytes32 m2; |
| 1147 | bytes32 m3; |
| 1148 | assembly ("memory-safe") { |
| 1149 | m0 := mload(0x00) |
| 1150 | m1 := mload(0x20) |
| 1151 | m2 := mload(0x40) |
| 1152 | m3 := mload(0x60) |
| 1153 | // Selector of `log(bool,address,bool)`. |
| 1154 | mstore(0x00, 0x18c9c746) |
| 1155 | mstore(0x20, p0) |
| 1156 | mstore(0x40, p1) |
| 1157 | mstore(0x60, p2) |
| 1158 | } |
| 1159 | _sendLogPayload(0x1c, 0x64); |
| 1160 | assembly ("memory-safe") { |
| 1161 | mstore(0x00, m0) |
| 1162 | mstore(0x20, m1) |
| 1163 | mstore(0x40, m2) |
| 1164 | mstore(0x60, m3) |
| 1165 | } |
| 1166 | } |
| 1167 | |
| 1168 | function log(bool p0, address p1, uint256 p2) internal pure { |
| 1169 | bytes32 m0; |
| 1170 | bytes32 m1; |
| 1171 | bytes32 m2; |
| 1172 | bytes32 m3; |
| 1173 | assembly ("memory-safe") { |
| 1174 | m0 := mload(0x00) |
| 1175 | m1 := mload(0x20) |
| 1176 | m2 := mload(0x40) |
| 1177 | m3 := mload(0x60) |
| 1178 | // Selector of `log(bool,address,uint256)`. |
| 1179 | mstore(0x00, 0x5f7b9afb) |
| 1180 | mstore(0x20, p0) |
| 1181 | mstore(0x40, p1) |
| 1182 | mstore(0x60, p2) |
| 1183 | } |
| 1184 | _sendLogPayload(0x1c, 0x64); |
| 1185 | assembly ("memory-safe") { |
| 1186 | mstore(0x00, m0) |
| 1187 | mstore(0x20, m1) |
| 1188 | mstore(0x40, m2) |
| 1189 | mstore(0x60, m3) |
| 1190 | } |
| 1191 | } |
| 1192 | |
| 1193 | function log(bool p0, address p1, bytes32 p2) internal pure { |
| 1194 | bytes32 m0; |
| 1195 | bytes32 m1; |
| 1196 | bytes32 m2; |
| 1197 | bytes32 m3; |
| 1198 | bytes32 m4; |
| 1199 | bytes32 m5; |
| 1200 | assembly ("memory-safe") { |
| 1201 | function writeString(pos, w) { |
| 1202 | let length := 0 |
| 1203 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1204 | mstore(pos, length) |
| 1205 | let shift := sub(256, shl(3, length)) |
| 1206 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1207 | } |
| 1208 | m0 := mload(0x00) |
| 1209 | m1 := mload(0x20) |
| 1210 | m2 := mload(0x40) |
| 1211 | m3 := mload(0x60) |
| 1212 | m4 := mload(0x80) |
| 1213 | m5 := mload(0xa0) |
| 1214 | // Selector of `log(bool,address,string)`. |
| 1215 | mstore(0x00, 0xde9a9270) |
| 1216 | mstore(0x20, p0) |
| 1217 | mstore(0x40, p1) |
| 1218 | mstore(0x60, 0x60) |
| 1219 | writeString(0x80, p2) |
| 1220 | } |
| 1221 | _sendLogPayload(0x1c, 0xa4); |
| 1222 | assembly ("memory-safe") { |
| 1223 | mstore(0x00, m0) |
| 1224 | mstore(0x20, m1) |
| 1225 | mstore(0x40, m2) |
| 1226 | mstore(0x60, m3) |
| 1227 | mstore(0x80, m4) |
| 1228 | mstore(0xa0, m5) |
| 1229 | } |
| 1230 | } |
| 1231 | |
| 1232 | function log(bool p0, bool p1, address p2) internal pure { |
| 1233 | bytes32 m0; |
| 1234 | bytes32 m1; |
| 1235 | bytes32 m2; |
| 1236 | bytes32 m3; |
| 1237 | assembly ("memory-safe") { |
| 1238 | m0 := mload(0x00) |
| 1239 | m1 := mload(0x20) |
| 1240 | m2 := mload(0x40) |
| 1241 | m3 := mload(0x60) |
| 1242 | // Selector of `log(bool,bool,address)`. |
| 1243 | mstore(0x00, 0x1078f68d) |
| 1244 | mstore(0x20, p0) |
| 1245 | mstore(0x40, p1) |
| 1246 | mstore(0x60, p2) |
| 1247 | } |
| 1248 | _sendLogPayload(0x1c, 0x64); |
| 1249 | assembly ("memory-safe") { |
| 1250 | mstore(0x00, m0) |
| 1251 | mstore(0x20, m1) |
| 1252 | mstore(0x40, m2) |
| 1253 | mstore(0x60, m3) |
| 1254 | } |
| 1255 | } |
| 1256 | |
| 1257 | function log(bool p0, bool p1, bool p2) internal pure { |
| 1258 | bytes32 m0; |
| 1259 | bytes32 m1; |
| 1260 | bytes32 m2; |
| 1261 | bytes32 m3; |
| 1262 | assembly ("memory-safe") { |
| 1263 | m0 := mload(0x00) |
| 1264 | m1 := mload(0x20) |
| 1265 | m2 := mload(0x40) |
| 1266 | m3 := mload(0x60) |
| 1267 | // Selector of `log(bool,bool,bool)`. |
| 1268 | mstore(0x00, 0x50709698) |
| 1269 | mstore(0x20, p0) |
| 1270 | mstore(0x40, p1) |
| 1271 | mstore(0x60, p2) |
| 1272 | } |
| 1273 | _sendLogPayload(0x1c, 0x64); |
| 1274 | assembly ("memory-safe") { |
| 1275 | mstore(0x00, m0) |
| 1276 | mstore(0x20, m1) |
| 1277 | mstore(0x40, m2) |
| 1278 | mstore(0x60, m3) |
| 1279 | } |
| 1280 | } |
| 1281 | |
| 1282 | function log(bool p0, bool p1, uint256 p2) internal pure { |
| 1283 | bytes32 m0; |
| 1284 | bytes32 m1; |
| 1285 | bytes32 m2; |
| 1286 | bytes32 m3; |
| 1287 | assembly ("memory-safe") { |
| 1288 | m0 := mload(0x00) |
| 1289 | m1 := mload(0x20) |
| 1290 | m2 := mload(0x40) |
| 1291 | m3 := mload(0x60) |
| 1292 | // Selector of `log(bool,bool,uint256)`. |
| 1293 | mstore(0x00, 0x12f21602) |
| 1294 | mstore(0x20, p0) |
| 1295 | mstore(0x40, p1) |
| 1296 | mstore(0x60, p2) |
| 1297 | } |
| 1298 | _sendLogPayload(0x1c, 0x64); |
| 1299 | assembly ("memory-safe") { |
| 1300 | mstore(0x00, m0) |
| 1301 | mstore(0x20, m1) |
| 1302 | mstore(0x40, m2) |
| 1303 | mstore(0x60, m3) |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | function log(bool p0, bool p1, bytes32 p2) internal pure { |
| 1308 | bytes32 m0; |
| 1309 | bytes32 m1; |
| 1310 | bytes32 m2; |
| 1311 | bytes32 m3; |
| 1312 | bytes32 m4; |
| 1313 | bytes32 m5; |
| 1314 | assembly ("memory-safe") { |
| 1315 | function writeString(pos, w) { |
| 1316 | let length := 0 |
| 1317 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1318 | mstore(pos, length) |
| 1319 | let shift := sub(256, shl(3, length)) |
| 1320 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1321 | } |
| 1322 | m0 := mload(0x00) |
| 1323 | m1 := mload(0x20) |
| 1324 | m2 := mload(0x40) |
| 1325 | m3 := mload(0x60) |
| 1326 | m4 := mload(0x80) |
| 1327 | m5 := mload(0xa0) |
| 1328 | // Selector of `log(bool,bool,string)`. |
| 1329 | mstore(0x00, 0x2555fa46) |
| 1330 | mstore(0x20, p0) |
| 1331 | mstore(0x40, p1) |
| 1332 | mstore(0x60, 0x60) |
| 1333 | writeString(0x80, p2) |
| 1334 | } |
| 1335 | _sendLogPayload(0x1c, 0xa4); |
| 1336 | assembly ("memory-safe") { |
| 1337 | mstore(0x00, m0) |
| 1338 | mstore(0x20, m1) |
| 1339 | mstore(0x40, m2) |
| 1340 | mstore(0x60, m3) |
| 1341 | mstore(0x80, m4) |
| 1342 | mstore(0xa0, m5) |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | function log(bool p0, uint256 p1, address p2) internal pure { |
| 1347 | bytes32 m0; |
| 1348 | bytes32 m1; |
| 1349 | bytes32 m2; |
| 1350 | bytes32 m3; |
| 1351 | assembly ("memory-safe") { |
| 1352 | m0 := mload(0x00) |
| 1353 | m1 := mload(0x20) |
| 1354 | m2 := mload(0x40) |
| 1355 | m3 := mload(0x60) |
| 1356 | // Selector of `log(bool,uint256,address)`. |
| 1357 | mstore(0x00, 0x088ef9d2) |
| 1358 | mstore(0x20, p0) |
| 1359 | mstore(0x40, p1) |
| 1360 | mstore(0x60, p2) |
| 1361 | } |
| 1362 | _sendLogPayload(0x1c, 0x64); |
| 1363 | assembly ("memory-safe") { |
| 1364 | mstore(0x00, m0) |
| 1365 | mstore(0x20, m1) |
| 1366 | mstore(0x40, m2) |
| 1367 | mstore(0x60, m3) |
| 1368 | } |
| 1369 | } |
| 1370 | |
| 1371 | function log(bool p0, uint256 p1, bool p2) internal pure { |
| 1372 | bytes32 m0; |
| 1373 | bytes32 m1; |
| 1374 | bytes32 m2; |
| 1375 | bytes32 m3; |
| 1376 | assembly ("memory-safe") { |
| 1377 | m0 := mload(0x00) |
| 1378 | m1 := mload(0x20) |
| 1379 | m2 := mload(0x40) |
| 1380 | m3 := mload(0x60) |
| 1381 | // Selector of `log(bool,uint256,bool)`. |
| 1382 | mstore(0x00, 0xe8defba9) |
| 1383 | mstore(0x20, p0) |
| 1384 | mstore(0x40, p1) |
| 1385 | mstore(0x60, p2) |
| 1386 | } |
| 1387 | _sendLogPayload(0x1c, 0x64); |
| 1388 | assembly ("memory-safe") { |
| 1389 | mstore(0x00, m0) |
| 1390 | mstore(0x20, m1) |
| 1391 | mstore(0x40, m2) |
| 1392 | mstore(0x60, m3) |
| 1393 | } |
| 1394 | } |
| 1395 | |
| 1396 | function log(bool p0, uint256 p1, uint256 p2) internal pure { |
| 1397 | bytes32 m0; |
| 1398 | bytes32 m1; |
| 1399 | bytes32 m2; |
| 1400 | bytes32 m3; |
| 1401 | assembly ("memory-safe") { |
| 1402 | m0 := mload(0x00) |
| 1403 | m1 := mload(0x20) |
| 1404 | m2 := mload(0x40) |
| 1405 | m3 := mload(0x60) |
| 1406 | // Selector of `log(bool,uint256,uint256)`. |
| 1407 | mstore(0x00, 0x37103367) |
| 1408 | mstore(0x20, p0) |
| 1409 | mstore(0x40, p1) |
| 1410 | mstore(0x60, p2) |
| 1411 | } |
| 1412 | _sendLogPayload(0x1c, 0x64); |
| 1413 | assembly ("memory-safe") { |
| 1414 | mstore(0x00, m0) |
| 1415 | mstore(0x20, m1) |
| 1416 | mstore(0x40, m2) |
| 1417 | mstore(0x60, m3) |
| 1418 | } |
| 1419 | } |
| 1420 | |
| 1421 | function log(bool p0, uint256 p1, bytes32 p2) internal pure { |
| 1422 | bytes32 m0; |
| 1423 | bytes32 m1; |
| 1424 | bytes32 m2; |
| 1425 | bytes32 m3; |
| 1426 | bytes32 m4; |
| 1427 | bytes32 m5; |
| 1428 | assembly ("memory-safe") { |
| 1429 | function writeString(pos, w) { |
| 1430 | let length := 0 |
| 1431 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1432 | mstore(pos, length) |
| 1433 | let shift := sub(256, shl(3, length)) |
| 1434 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1435 | } |
| 1436 | m0 := mload(0x00) |
| 1437 | m1 := mload(0x20) |
| 1438 | m2 := mload(0x40) |
| 1439 | m3 := mload(0x60) |
| 1440 | m4 := mload(0x80) |
| 1441 | m5 := mload(0xa0) |
| 1442 | // Selector of `log(bool,uint256,string)`. |
| 1443 | mstore(0x00, 0xc3fc3970) |
| 1444 | mstore(0x20, p0) |
| 1445 | mstore(0x40, p1) |
| 1446 | mstore(0x60, 0x60) |
| 1447 | writeString(0x80, p2) |
| 1448 | } |
| 1449 | _sendLogPayload(0x1c, 0xa4); |
| 1450 | assembly ("memory-safe") { |
| 1451 | mstore(0x00, m0) |
| 1452 | mstore(0x20, m1) |
| 1453 | mstore(0x40, m2) |
| 1454 | mstore(0x60, m3) |
| 1455 | mstore(0x80, m4) |
| 1456 | mstore(0xa0, m5) |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | function log(bool p0, bytes32 p1, address p2) internal pure { |
| 1461 | bytes32 m0; |
| 1462 | bytes32 m1; |
| 1463 | bytes32 m2; |
| 1464 | bytes32 m3; |
| 1465 | bytes32 m4; |
| 1466 | bytes32 m5; |
| 1467 | assembly ("memory-safe") { |
| 1468 | function writeString(pos, w) { |
| 1469 | let length := 0 |
| 1470 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1471 | mstore(pos, length) |
| 1472 | let shift := sub(256, shl(3, length)) |
| 1473 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1474 | } |
| 1475 | m0 := mload(0x00) |
| 1476 | m1 := mload(0x20) |
| 1477 | m2 := mload(0x40) |
| 1478 | m3 := mload(0x60) |
| 1479 | m4 := mload(0x80) |
| 1480 | m5 := mload(0xa0) |
| 1481 | // Selector of `log(bool,string,address)`. |
| 1482 | mstore(0x00, 0x9591b953) |
| 1483 | mstore(0x20, p0) |
| 1484 | mstore(0x40, 0x60) |
| 1485 | mstore(0x60, p2) |
| 1486 | writeString(0x80, p1) |
| 1487 | } |
| 1488 | _sendLogPayload(0x1c, 0xa4); |
| 1489 | assembly ("memory-safe") { |
| 1490 | mstore(0x00, m0) |
| 1491 | mstore(0x20, m1) |
| 1492 | mstore(0x40, m2) |
| 1493 | mstore(0x60, m3) |
| 1494 | mstore(0x80, m4) |
| 1495 | mstore(0xa0, m5) |
| 1496 | } |
| 1497 | } |
| 1498 | |
| 1499 | function log(bool p0, bytes32 p1, bool p2) internal pure { |
| 1500 | bytes32 m0; |
| 1501 | bytes32 m1; |
| 1502 | bytes32 m2; |
| 1503 | bytes32 m3; |
| 1504 | bytes32 m4; |
| 1505 | bytes32 m5; |
| 1506 | assembly ("memory-safe") { |
| 1507 | function writeString(pos, w) { |
| 1508 | let length := 0 |
| 1509 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1510 | mstore(pos, length) |
| 1511 | let shift := sub(256, shl(3, length)) |
| 1512 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1513 | } |
| 1514 | m0 := mload(0x00) |
| 1515 | m1 := mload(0x20) |
| 1516 | m2 := mload(0x40) |
| 1517 | m3 := mload(0x60) |
| 1518 | m4 := mload(0x80) |
| 1519 | m5 := mload(0xa0) |
| 1520 | // Selector of `log(bool,string,bool)`. |
| 1521 | mstore(0x00, 0xdbb4c247) |
| 1522 | mstore(0x20, p0) |
| 1523 | mstore(0x40, 0x60) |
| 1524 | mstore(0x60, p2) |
| 1525 | writeString(0x80, p1) |
| 1526 | } |
| 1527 | _sendLogPayload(0x1c, 0xa4); |
| 1528 | assembly ("memory-safe") { |
| 1529 | mstore(0x00, m0) |
| 1530 | mstore(0x20, m1) |
| 1531 | mstore(0x40, m2) |
| 1532 | mstore(0x60, m3) |
| 1533 | mstore(0x80, m4) |
| 1534 | mstore(0xa0, m5) |
| 1535 | } |
| 1536 | } |
| 1537 | |
| 1538 | function log(bool p0, bytes32 p1, uint256 p2) internal pure { |
| 1539 | bytes32 m0; |
| 1540 | bytes32 m1; |
| 1541 | bytes32 m2; |
| 1542 | bytes32 m3; |
| 1543 | bytes32 m4; |
| 1544 | bytes32 m5; |
| 1545 | assembly ("memory-safe") { |
| 1546 | function writeString(pos, w) { |
| 1547 | let length := 0 |
| 1548 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1549 | mstore(pos, length) |
| 1550 | let shift := sub(256, shl(3, length)) |
| 1551 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1552 | } |
| 1553 | m0 := mload(0x00) |
| 1554 | m1 := mload(0x20) |
| 1555 | m2 := mload(0x40) |
| 1556 | m3 := mload(0x60) |
| 1557 | m4 := mload(0x80) |
| 1558 | m5 := mload(0xa0) |
| 1559 | // Selector of `log(bool,string,uint256)`. |
| 1560 | mstore(0x00, 0x1093ee11) |
| 1561 | mstore(0x20, p0) |
| 1562 | mstore(0x40, 0x60) |
| 1563 | mstore(0x60, p2) |
| 1564 | writeString(0x80, p1) |
| 1565 | } |
| 1566 | _sendLogPayload(0x1c, 0xa4); |
| 1567 | assembly ("memory-safe") { |
| 1568 | mstore(0x00, m0) |
| 1569 | mstore(0x20, m1) |
| 1570 | mstore(0x40, m2) |
| 1571 | mstore(0x60, m3) |
| 1572 | mstore(0x80, m4) |
| 1573 | mstore(0xa0, m5) |
| 1574 | } |
| 1575 | } |
| 1576 | |
| 1577 | function log(bool p0, bytes32 p1, bytes32 p2) internal pure { |
| 1578 | bytes32 m0; |
| 1579 | bytes32 m1; |
| 1580 | bytes32 m2; |
| 1581 | bytes32 m3; |
| 1582 | bytes32 m4; |
| 1583 | bytes32 m5; |
| 1584 | bytes32 m6; |
| 1585 | bytes32 m7; |
| 1586 | assembly ("memory-safe") { |
| 1587 | function writeString(pos, w) { |
| 1588 | let length := 0 |
| 1589 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1590 | mstore(pos, length) |
| 1591 | let shift := sub(256, shl(3, length)) |
| 1592 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1593 | } |
| 1594 | m0 := mload(0x00) |
| 1595 | m1 := mload(0x20) |
| 1596 | m2 := mload(0x40) |
| 1597 | m3 := mload(0x60) |
| 1598 | m4 := mload(0x80) |
| 1599 | m5 := mload(0xa0) |
| 1600 | m6 := mload(0xc0) |
| 1601 | m7 := mload(0xe0) |
| 1602 | // Selector of `log(bool,string,string)`. |
| 1603 | mstore(0x00, 0xb076847f) |
| 1604 | mstore(0x20, p0) |
| 1605 | mstore(0x40, 0x60) |
| 1606 | mstore(0x60, 0xa0) |
| 1607 | writeString(0x80, p1) |
| 1608 | writeString(0xc0, p2) |
| 1609 | } |
| 1610 | _sendLogPayload(0x1c, 0xe4); |
| 1611 | assembly ("memory-safe") { |
| 1612 | mstore(0x00, m0) |
| 1613 | mstore(0x20, m1) |
| 1614 | mstore(0x40, m2) |
| 1615 | mstore(0x60, m3) |
| 1616 | mstore(0x80, m4) |
| 1617 | mstore(0xa0, m5) |
| 1618 | mstore(0xc0, m6) |
| 1619 | mstore(0xe0, m7) |
| 1620 | } |
| 1621 | } |
| 1622 | |
| 1623 | function log(uint256 p0, address p1, address p2) internal pure { |
| 1624 | bytes32 m0; |
| 1625 | bytes32 m1; |
| 1626 | bytes32 m2; |
| 1627 | bytes32 m3; |
| 1628 | assembly ("memory-safe") { |
| 1629 | m0 := mload(0x00) |
| 1630 | m1 := mload(0x20) |
| 1631 | m2 := mload(0x40) |
| 1632 | m3 := mload(0x60) |
| 1633 | // Selector of `log(uint256,address,address)`. |
| 1634 | mstore(0x00, 0xbcfd9be0) |
| 1635 | mstore(0x20, p0) |
| 1636 | mstore(0x40, p1) |
| 1637 | mstore(0x60, p2) |
| 1638 | } |
| 1639 | _sendLogPayload(0x1c, 0x64); |
| 1640 | assembly ("memory-safe") { |
| 1641 | mstore(0x00, m0) |
| 1642 | mstore(0x20, m1) |
| 1643 | mstore(0x40, m2) |
| 1644 | mstore(0x60, m3) |
| 1645 | } |
| 1646 | } |
| 1647 | |
| 1648 | function log(uint256 p0, address p1, bool p2) internal pure { |
| 1649 | bytes32 m0; |
| 1650 | bytes32 m1; |
| 1651 | bytes32 m2; |
| 1652 | bytes32 m3; |
| 1653 | assembly ("memory-safe") { |
| 1654 | m0 := mload(0x00) |
| 1655 | m1 := mload(0x20) |
| 1656 | m2 := mload(0x40) |
| 1657 | m3 := mload(0x60) |
| 1658 | // Selector of `log(uint256,address,bool)`. |
| 1659 | mstore(0x00, 0x9b6ec042) |
| 1660 | mstore(0x20, p0) |
| 1661 | mstore(0x40, p1) |
| 1662 | mstore(0x60, p2) |
| 1663 | } |
| 1664 | _sendLogPayload(0x1c, 0x64); |
| 1665 | assembly ("memory-safe") { |
| 1666 | mstore(0x00, m0) |
| 1667 | mstore(0x20, m1) |
| 1668 | mstore(0x40, m2) |
| 1669 | mstore(0x60, m3) |
| 1670 | } |
| 1671 | } |
| 1672 | |
| 1673 | function log(uint256 p0, address p1, uint256 p2) internal pure { |
| 1674 | bytes32 m0; |
| 1675 | bytes32 m1; |
| 1676 | bytes32 m2; |
| 1677 | bytes32 m3; |
| 1678 | assembly ("memory-safe") { |
| 1679 | m0 := mload(0x00) |
| 1680 | m1 := mload(0x20) |
| 1681 | m2 := mload(0x40) |
| 1682 | m3 := mload(0x60) |
| 1683 | // Selector of `log(uint256,address,uint256)`. |
| 1684 | mstore(0x00, 0x5a9b5ed5) |
| 1685 | mstore(0x20, p0) |
| 1686 | mstore(0x40, p1) |
| 1687 | mstore(0x60, p2) |
| 1688 | } |
| 1689 | _sendLogPayload(0x1c, 0x64); |
| 1690 | assembly ("memory-safe") { |
| 1691 | mstore(0x00, m0) |
| 1692 | mstore(0x20, m1) |
| 1693 | mstore(0x40, m2) |
| 1694 | mstore(0x60, m3) |
| 1695 | } |
| 1696 | } |
| 1697 | |
| 1698 | function log(uint256 p0, address p1, bytes32 p2) internal pure { |
| 1699 | bytes32 m0; |
| 1700 | bytes32 m1; |
| 1701 | bytes32 m2; |
| 1702 | bytes32 m3; |
| 1703 | bytes32 m4; |
| 1704 | bytes32 m5; |
| 1705 | assembly ("memory-safe") { |
| 1706 | function writeString(pos, w) { |
| 1707 | let length := 0 |
| 1708 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1709 | mstore(pos, length) |
| 1710 | let shift := sub(256, shl(3, length)) |
| 1711 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1712 | } |
| 1713 | m0 := mload(0x00) |
| 1714 | m1 := mload(0x20) |
| 1715 | m2 := mload(0x40) |
| 1716 | m3 := mload(0x60) |
| 1717 | m4 := mload(0x80) |
| 1718 | m5 := mload(0xa0) |
| 1719 | // Selector of `log(uint256,address,string)`. |
| 1720 | mstore(0x00, 0x63cb41f9) |
| 1721 | mstore(0x20, p0) |
| 1722 | mstore(0x40, p1) |
| 1723 | mstore(0x60, 0x60) |
| 1724 | writeString(0x80, p2) |
| 1725 | } |
| 1726 | _sendLogPayload(0x1c, 0xa4); |
| 1727 | assembly ("memory-safe") { |
| 1728 | mstore(0x00, m0) |
| 1729 | mstore(0x20, m1) |
| 1730 | mstore(0x40, m2) |
| 1731 | mstore(0x60, m3) |
| 1732 | mstore(0x80, m4) |
| 1733 | mstore(0xa0, m5) |
| 1734 | } |
| 1735 | } |
| 1736 | |
| 1737 | function log(uint256 p0, bool p1, address p2) internal pure { |
| 1738 | bytes32 m0; |
| 1739 | bytes32 m1; |
| 1740 | bytes32 m2; |
| 1741 | bytes32 m3; |
| 1742 | assembly ("memory-safe") { |
| 1743 | m0 := mload(0x00) |
| 1744 | m1 := mload(0x20) |
| 1745 | m2 := mload(0x40) |
| 1746 | m3 := mload(0x60) |
| 1747 | // Selector of `log(uint256,bool,address)`. |
| 1748 | mstore(0x00, 0x35085f7b) |
| 1749 | mstore(0x20, p0) |
| 1750 | mstore(0x40, p1) |
| 1751 | mstore(0x60, p2) |
| 1752 | } |
| 1753 | _sendLogPayload(0x1c, 0x64); |
| 1754 | assembly ("memory-safe") { |
| 1755 | mstore(0x00, m0) |
| 1756 | mstore(0x20, m1) |
| 1757 | mstore(0x40, m2) |
| 1758 | mstore(0x60, m3) |
| 1759 | } |
| 1760 | } |
| 1761 | |
| 1762 | function log(uint256 p0, bool p1, bool p2) internal pure { |
| 1763 | bytes32 m0; |
| 1764 | bytes32 m1; |
| 1765 | bytes32 m2; |
| 1766 | bytes32 m3; |
| 1767 | assembly ("memory-safe") { |
| 1768 | m0 := mload(0x00) |
| 1769 | m1 := mload(0x20) |
| 1770 | m2 := mload(0x40) |
| 1771 | m3 := mload(0x60) |
| 1772 | // Selector of `log(uint256,bool,bool)`. |
| 1773 | mstore(0x00, 0x20718650) |
| 1774 | mstore(0x20, p0) |
| 1775 | mstore(0x40, p1) |
| 1776 | mstore(0x60, p2) |
| 1777 | } |
| 1778 | _sendLogPayload(0x1c, 0x64); |
| 1779 | assembly ("memory-safe") { |
| 1780 | mstore(0x00, m0) |
| 1781 | mstore(0x20, m1) |
| 1782 | mstore(0x40, m2) |
| 1783 | mstore(0x60, m3) |
| 1784 | } |
| 1785 | } |
| 1786 | |
| 1787 | function log(uint256 p0, bool p1, uint256 p2) internal pure { |
| 1788 | bytes32 m0; |
| 1789 | bytes32 m1; |
| 1790 | bytes32 m2; |
| 1791 | bytes32 m3; |
| 1792 | assembly ("memory-safe") { |
| 1793 | m0 := mload(0x00) |
| 1794 | m1 := mload(0x20) |
| 1795 | m2 := mload(0x40) |
| 1796 | m3 := mload(0x60) |
| 1797 | // Selector of `log(uint256,bool,uint256)`. |
| 1798 | mstore(0x00, 0x20098014) |
| 1799 | mstore(0x20, p0) |
| 1800 | mstore(0x40, p1) |
| 1801 | mstore(0x60, p2) |
| 1802 | } |
| 1803 | _sendLogPayload(0x1c, 0x64); |
| 1804 | assembly ("memory-safe") { |
| 1805 | mstore(0x00, m0) |
| 1806 | mstore(0x20, m1) |
| 1807 | mstore(0x40, m2) |
| 1808 | mstore(0x60, m3) |
| 1809 | } |
| 1810 | } |
| 1811 | |
| 1812 | function log(uint256 p0, bool p1, bytes32 p2) internal pure { |
| 1813 | bytes32 m0; |
| 1814 | bytes32 m1; |
| 1815 | bytes32 m2; |
| 1816 | bytes32 m3; |
| 1817 | bytes32 m4; |
| 1818 | bytes32 m5; |
| 1819 | assembly ("memory-safe") { |
| 1820 | function writeString(pos, w) { |
| 1821 | let length := 0 |
| 1822 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1823 | mstore(pos, length) |
| 1824 | let shift := sub(256, shl(3, length)) |
| 1825 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1826 | } |
| 1827 | m0 := mload(0x00) |
| 1828 | m1 := mload(0x20) |
| 1829 | m2 := mload(0x40) |
| 1830 | m3 := mload(0x60) |
| 1831 | m4 := mload(0x80) |
| 1832 | m5 := mload(0xa0) |
| 1833 | // Selector of `log(uint256,bool,string)`. |
| 1834 | mstore(0x00, 0x85775021) |
| 1835 | mstore(0x20, p0) |
| 1836 | mstore(0x40, p1) |
| 1837 | mstore(0x60, 0x60) |
| 1838 | writeString(0x80, p2) |
| 1839 | } |
| 1840 | _sendLogPayload(0x1c, 0xa4); |
| 1841 | assembly ("memory-safe") { |
| 1842 | mstore(0x00, m0) |
| 1843 | mstore(0x20, m1) |
| 1844 | mstore(0x40, m2) |
| 1845 | mstore(0x60, m3) |
| 1846 | mstore(0x80, m4) |
| 1847 | mstore(0xa0, m5) |
| 1848 | } |
| 1849 | } |
| 1850 | |
| 1851 | function log(uint256 p0, uint256 p1, address p2) internal pure { |
| 1852 | bytes32 m0; |
| 1853 | bytes32 m1; |
| 1854 | bytes32 m2; |
| 1855 | bytes32 m3; |
| 1856 | assembly ("memory-safe") { |
| 1857 | m0 := mload(0x00) |
| 1858 | m1 := mload(0x20) |
| 1859 | m2 := mload(0x40) |
| 1860 | m3 := mload(0x60) |
| 1861 | // Selector of `log(uint256,uint256,address)`. |
| 1862 | mstore(0x00, 0x5c96b331) |
| 1863 | mstore(0x20, p0) |
| 1864 | mstore(0x40, p1) |
| 1865 | mstore(0x60, p2) |
| 1866 | } |
| 1867 | _sendLogPayload(0x1c, 0x64); |
| 1868 | assembly ("memory-safe") { |
| 1869 | mstore(0x00, m0) |
| 1870 | mstore(0x20, m1) |
| 1871 | mstore(0x40, m2) |
| 1872 | mstore(0x60, m3) |
| 1873 | } |
| 1874 | } |
| 1875 | |
| 1876 | function log(uint256 p0, uint256 p1, bool p2) internal pure { |
| 1877 | bytes32 m0; |
| 1878 | bytes32 m1; |
| 1879 | bytes32 m2; |
| 1880 | bytes32 m3; |
| 1881 | assembly ("memory-safe") { |
| 1882 | m0 := mload(0x00) |
| 1883 | m1 := mload(0x20) |
| 1884 | m2 := mload(0x40) |
| 1885 | m3 := mload(0x60) |
| 1886 | // Selector of `log(uint256,uint256,bool)`. |
| 1887 | mstore(0x00, 0x4766da72) |
| 1888 | mstore(0x20, p0) |
| 1889 | mstore(0x40, p1) |
| 1890 | mstore(0x60, p2) |
| 1891 | } |
| 1892 | _sendLogPayload(0x1c, 0x64); |
| 1893 | assembly ("memory-safe") { |
| 1894 | mstore(0x00, m0) |
| 1895 | mstore(0x20, m1) |
| 1896 | mstore(0x40, m2) |
| 1897 | mstore(0x60, m3) |
| 1898 | } |
| 1899 | } |
| 1900 | |
| 1901 | function log(uint256 p0, uint256 p1, uint256 p2) internal pure { |
| 1902 | bytes32 m0; |
| 1903 | bytes32 m1; |
| 1904 | bytes32 m2; |
| 1905 | bytes32 m3; |
| 1906 | assembly ("memory-safe") { |
| 1907 | m0 := mload(0x00) |
| 1908 | m1 := mload(0x20) |
| 1909 | m2 := mload(0x40) |
| 1910 | m3 := mload(0x60) |
| 1911 | // Selector of `log(uint256,uint256,uint256)`. |
| 1912 | mstore(0x00, 0xd1ed7a3c) |
| 1913 | mstore(0x20, p0) |
| 1914 | mstore(0x40, p1) |
| 1915 | mstore(0x60, p2) |
| 1916 | } |
| 1917 | _sendLogPayload(0x1c, 0x64); |
| 1918 | assembly ("memory-safe") { |
| 1919 | mstore(0x00, m0) |
| 1920 | mstore(0x20, m1) |
| 1921 | mstore(0x40, m2) |
| 1922 | mstore(0x60, m3) |
| 1923 | } |
| 1924 | } |
| 1925 | |
| 1926 | function log(uint256 p0, uint256 p1, bytes32 p2) internal pure { |
| 1927 | bytes32 m0; |
| 1928 | bytes32 m1; |
| 1929 | bytes32 m2; |
| 1930 | bytes32 m3; |
| 1931 | bytes32 m4; |
| 1932 | bytes32 m5; |
| 1933 | assembly ("memory-safe") { |
| 1934 | function writeString(pos, w) { |
| 1935 | let length := 0 |
| 1936 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1937 | mstore(pos, length) |
| 1938 | let shift := sub(256, shl(3, length)) |
| 1939 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1940 | } |
| 1941 | m0 := mload(0x00) |
| 1942 | m1 := mload(0x20) |
| 1943 | m2 := mload(0x40) |
| 1944 | m3 := mload(0x60) |
| 1945 | m4 := mload(0x80) |
| 1946 | m5 := mload(0xa0) |
| 1947 | // Selector of `log(uint256,uint256,string)`. |
| 1948 | mstore(0x00, 0x71d04af2) |
| 1949 | mstore(0x20, p0) |
| 1950 | mstore(0x40, p1) |
| 1951 | mstore(0x60, 0x60) |
| 1952 | writeString(0x80, p2) |
| 1953 | } |
| 1954 | _sendLogPayload(0x1c, 0xa4); |
| 1955 | assembly ("memory-safe") { |
| 1956 | mstore(0x00, m0) |
| 1957 | mstore(0x20, m1) |
| 1958 | mstore(0x40, m2) |
| 1959 | mstore(0x60, m3) |
| 1960 | mstore(0x80, m4) |
| 1961 | mstore(0xa0, m5) |
| 1962 | } |
| 1963 | } |
| 1964 | |
| 1965 | function log(uint256 p0, bytes32 p1, address p2) internal pure { |
| 1966 | bytes32 m0; |
| 1967 | bytes32 m1; |
| 1968 | bytes32 m2; |
| 1969 | bytes32 m3; |
| 1970 | bytes32 m4; |
| 1971 | bytes32 m5; |
| 1972 | assembly ("memory-safe") { |
| 1973 | function writeString(pos, w) { |
| 1974 | let length := 0 |
| 1975 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 1976 | mstore(pos, length) |
| 1977 | let shift := sub(256, shl(3, length)) |
| 1978 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 1979 | } |
| 1980 | m0 := mload(0x00) |
| 1981 | m1 := mload(0x20) |
| 1982 | m2 := mload(0x40) |
| 1983 | m3 := mload(0x60) |
| 1984 | m4 := mload(0x80) |
| 1985 | m5 := mload(0xa0) |
| 1986 | // Selector of `log(uint256,string,address)`. |
| 1987 | mstore(0x00, 0x7afac959) |
| 1988 | mstore(0x20, p0) |
| 1989 | mstore(0x40, 0x60) |
| 1990 | mstore(0x60, p2) |
| 1991 | writeString(0x80, p1) |
| 1992 | } |
| 1993 | _sendLogPayload(0x1c, 0xa4); |
| 1994 | assembly ("memory-safe") { |
| 1995 | mstore(0x00, m0) |
| 1996 | mstore(0x20, m1) |
| 1997 | mstore(0x40, m2) |
| 1998 | mstore(0x60, m3) |
| 1999 | mstore(0x80, m4) |
| 2000 | mstore(0xa0, m5) |
| 2001 | } |
| 2002 | } |
| 2003 | |
| 2004 | function log(uint256 p0, bytes32 p1, bool p2) internal pure { |
| 2005 | bytes32 m0; |
| 2006 | bytes32 m1; |
| 2007 | bytes32 m2; |
| 2008 | bytes32 m3; |
| 2009 | bytes32 m4; |
| 2010 | bytes32 m5; |
| 2011 | assembly ("memory-safe") { |
| 2012 | function writeString(pos, w) { |
| 2013 | let length := 0 |
| 2014 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2015 | mstore(pos, length) |
| 2016 | let shift := sub(256, shl(3, length)) |
| 2017 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2018 | } |
| 2019 | m0 := mload(0x00) |
| 2020 | m1 := mload(0x20) |
| 2021 | m2 := mload(0x40) |
| 2022 | m3 := mload(0x60) |
| 2023 | m4 := mload(0x80) |
| 2024 | m5 := mload(0xa0) |
| 2025 | // Selector of `log(uint256,string,bool)`. |
| 2026 | mstore(0x00, 0x4ceda75a) |
| 2027 | mstore(0x20, p0) |
| 2028 | mstore(0x40, 0x60) |
| 2029 | mstore(0x60, p2) |
| 2030 | writeString(0x80, p1) |
| 2031 | } |
| 2032 | _sendLogPayload(0x1c, 0xa4); |
| 2033 | assembly ("memory-safe") { |
| 2034 | mstore(0x00, m0) |
| 2035 | mstore(0x20, m1) |
| 2036 | mstore(0x40, m2) |
| 2037 | mstore(0x60, m3) |
| 2038 | mstore(0x80, m4) |
| 2039 | mstore(0xa0, m5) |
| 2040 | } |
| 2041 | } |
| 2042 | |
| 2043 | function log(uint256 p0, bytes32 p1, uint256 p2) internal pure { |
| 2044 | bytes32 m0; |
| 2045 | bytes32 m1; |
| 2046 | bytes32 m2; |
| 2047 | bytes32 m3; |
| 2048 | bytes32 m4; |
| 2049 | bytes32 m5; |
| 2050 | assembly ("memory-safe") { |
| 2051 | function writeString(pos, w) { |
| 2052 | let length := 0 |
| 2053 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2054 | mstore(pos, length) |
| 2055 | let shift := sub(256, shl(3, length)) |
| 2056 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2057 | } |
| 2058 | m0 := mload(0x00) |
| 2059 | m1 := mload(0x20) |
| 2060 | m2 := mload(0x40) |
| 2061 | m3 := mload(0x60) |
| 2062 | m4 := mload(0x80) |
| 2063 | m5 := mload(0xa0) |
| 2064 | // Selector of `log(uint256,string,uint256)`. |
| 2065 | mstore(0x00, 0x37aa7d4c) |
| 2066 | mstore(0x20, p0) |
| 2067 | mstore(0x40, 0x60) |
| 2068 | mstore(0x60, p2) |
| 2069 | writeString(0x80, p1) |
| 2070 | } |
| 2071 | _sendLogPayload(0x1c, 0xa4); |
| 2072 | assembly ("memory-safe") { |
| 2073 | mstore(0x00, m0) |
| 2074 | mstore(0x20, m1) |
| 2075 | mstore(0x40, m2) |
| 2076 | mstore(0x60, m3) |
| 2077 | mstore(0x80, m4) |
| 2078 | mstore(0xa0, m5) |
| 2079 | } |
| 2080 | } |
| 2081 | |
| 2082 | function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure { |
| 2083 | bytes32 m0; |
| 2084 | bytes32 m1; |
| 2085 | bytes32 m2; |
| 2086 | bytes32 m3; |
| 2087 | bytes32 m4; |
| 2088 | bytes32 m5; |
| 2089 | bytes32 m6; |
| 2090 | bytes32 m7; |
| 2091 | assembly ("memory-safe") { |
| 2092 | function writeString(pos, w) { |
| 2093 | let length := 0 |
| 2094 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2095 | mstore(pos, length) |
| 2096 | let shift := sub(256, shl(3, length)) |
| 2097 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2098 | } |
| 2099 | m0 := mload(0x00) |
| 2100 | m1 := mload(0x20) |
| 2101 | m2 := mload(0x40) |
| 2102 | m3 := mload(0x60) |
| 2103 | m4 := mload(0x80) |
| 2104 | m5 := mload(0xa0) |
| 2105 | m6 := mload(0xc0) |
| 2106 | m7 := mload(0xe0) |
| 2107 | // Selector of `log(uint256,string,string)`. |
| 2108 | mstore(0x00, 0xb115611f) |
| 2109 | mstore(0x20, p0) |
| 2110 | mstore(0x40, 0x60) |
| 2111 | mstore(0x60, 0xa0) |
| 2112 | writeString(0x80, p1) |
| 2113 | writeString(0xc0, p2) |
| 2114 | } |
| 2115 | _sendLogPayload(0x1c, 0xe4); |
| 2116 | assembly ("memory-safe") { |
| 2117 | mstore(0x00, m0) |
| 2118 | mstore(0x20, m1) |
| 2119 | mstore(0x40, m2) |
| 2120 | mstore(0x60, m3) |
| 2121 | mstore(0x80, m4) |
| 2122 | mstore(0xa0, m5) |
| 2123 | mstore(0xc0, m6) |
| 2124 | mstore(0xe0, m7) |
| 2125 | } |
| 2126 | } |
| 2127 | |
| 2128 | function log(bytes32 p0, address p1, address p2) internal pure { |
| 2129 | bytes32 m0; |
| 2130 | bytes32 m1; |
| 2131 | bytes32 m2; |
| 2132 | bytes32 m3; |
| 2133 | bytes32 m4; |
| 2134 | bytes32 m5; |
| 2135 | assembly ("memory-safe") { |
| 2136 | function writeString(pos, w) { |
| 2137 | let length := 0 |
| 2138 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2139 | mstore(pos, length) |
| 2140 | let shift := sub(256, shl(3, length)) |
| 2141 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2142 | } |
| 2143 | m0 := mload(0x00) |
| 2144 | m1 := mload(0x20) |
| 2145 | m2 := mload(0x40) |
| 2146 | m3 := mload(0x60) |
| 2147 | m4 := mload(0x80) |
| 2148 | m5 := mload(0xa0) |
| 2149 | // Selector of `log(string,address,address)`. |
| 2150 | mstore(0x00, 0xfcec75e0) |
| 2151 | mstore(0x20, 0x60) |
| 2152 | mstore(0x40, p1) |
| 2153 | mstore(0x60, p2) |
| 2154 | writeString(0x80, p0) |
| 2155 | } |
| 2156 | _sendLogPayload(0x1c, 0xa4); |
| 2157 | assembly ("memory-safe") { |
| 2158 | mstore(0x00, m0) |
| 2159 | mstore(0x20, m1) |
| 2160 | mstore(0x40, m2) |
| 2161 | mstore(0x60, m3) |
| 2162 | mstore(0x80, m4) |
| 2163 | mstore(0xa0, m5) |
| 2164 | } |
| 2165 | } |
| 2166 | |
| 2167 | function log(bytes32 p0, address p1, bool p2) internal pure { |
| 2168 | bytes32 m0; |
| 2169 | bytes32 m1; |
| 2170 | bytes32 m2; |
| 2171 | bytes32 m3; |
| 2172 | bytes32 m4; |
| 2173 | bytes32 m5; |
| 2174 | assembly ("memory-safe") { |
| 2175 | function writeString(pos, w) { |
| 2176 | let length := 0 |
| 2177 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2178 | mstore(pos, length) |
| 2179 | let shift := sub(256, shl(3, length)) |
| 2180 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2181 | } |
| 2182 | m0 := mload(0x00) |
| 2183 | m1 := mload(0x20) |
| 2184 | m2 := mload(0x40) |
| 2185 | m3 := mload(0x60) |
| 2186 | m4 := mload(0x80) |
| 2187 | m5 := mload(0xa0) |
| 2188 | // Selector of `log(string,address,bool)`. |
| 2189 | mstore(0x00, 0xc91d5ed4) |
| 2190 | mstore(0x20, 0x60) |
| 2191 | mstore(0x40, p1) |
| 2192 | mstore(0x60, p2) |
| 2193 | writeString(0x80, p0) |
| 2194 | } |
| 2195 | _sendLogPayload(0x1c, 0xa4); |
| 2196 | assembly ("memory-safe") { |
| 2197 | mstore(0x00, m0) |
| 2198 | mstore(0x20, m1) |
| 2199 | mstore(0x40, m2) |
| 2200 | mstore(0x60, m3) |
| 2201 | mstore(0x80, m4) |
| 2202 | mstore(0xa0, m5) |
| 2203 | } |
| 2204 | } |
| 2205 | |
| 2206 | function log(bytes32 p0, address p1, uint256 p2) internal pure { |
| 2207 | bytes32 m0; |
| 2208 | bytes32 m1; |
| 2209 | bytes32 m2; |
| 2210 | bytes32 m3; |
| 2211 | bytes32 m4; |
| 2212 | bytes32 m5; |
| 2213 | assembly ("memory-safe") { |
| 2214 | function writeString(pos, w) { |
| 2215 | let length := 0 |
| 2216 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2217 | mstore(pos, length) |
| 2218 | let shift := sub(256, shl(3, length)) |
| 2219 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2220 | } |
| 2221 | m0 := mload(0x00) |
| 2222 | m1 := mload(0x20) |
| 2223 | m2 := mload(0x40) |
| 2224 | m3 := mload(0x60) |
| 2225 | m4 := mload(0x80) |
| 2226 | m5 := mload(0xa0) |
| 2227 | // Selector of `log(string,address,uint256)`. |
| 2228 | mstore(0x00, 0x0d26b925) |
| 2229 | mstore(0x20, 0x60) |
| 2230 | mstore(0x40, p1) |
| 2231 | mstore(0x60, p2) |
| 2232 | writeString(0x80, p0) |
| 2233 | } |
| 2234 | _sendLogPayload(0x1c, 0xa4); |
| 2235 | assembly ("memory-safe") { |
| 2236 | mstore(0x00, m0) |
| 2237 | mstore(0x20, m1) |
| 2238 | mstore(0x40, m2) |
| 2239 | mstore(0x60, m3) |
| 2240 | mstore(0x80, m4) |
| 2241 | mstore(0xa0, m5) |
| 2242 | } |
| 2243 | } |
| 2244 | |
| 2245 | function log(bytes32 p0, address p1, bytes32 p2) internal pure { |
| 2246 | bytes32 m0; |
| 2247 | bytes32 m1; |
| 2248 | bytes32 m2; |
| 2249 | bytes32 m3; |
| 2250 | bytes32 m4; |
| 2251 | bytes32 m5; |
| 2252 | bytes32 m6; |
| 2253 | bytes32 m7; |
| 2254 | assembly ("memory-safe") { |
| 2255 | function writeString(pos, w) { |
| 2256 | let length := 0 |
| 2257 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2258 | mstore(pos, length) |
| 2259 | let shift := sub(256, shl(3, length)) |
| 2260 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2261 | } |
| 2262 | m0 := mload(0x00) |
| 2263 | m1 := mload(0x20) |
| 2264 | m2 := mload(0x40) |
| 2265 | m3 := mload(0x60) |
| 2266 | m4 := mload(0x80) |
| 2267 | m5 := mload(0xa0) |
| 2268 | m6 := mload(0xc0) |
| 2269 | m7 := mload(0xe0) |
| 2270 | // Selector of `log(string,address,string)`. |
| 2271 | mstore(0x00, 0xe0e9ad4f) |
| 2272 | mstore(0x20, 0x60) |
| 2273 | mstore(0x40, p1) |
| 2274 | mstore(0x60, 0xa0) |
| 2275 | writeString(0x80, p0) |
| 2276 | writeString(0xc0, p2) |
| 2277 | } |
| 2278 | _sendLogPayload(0x1c, 0xe4); |
| 2279 | assembly ("memory-safe") { |
| 2280 | mstore(0x00, m0) |
| 2281 | mstore(0x20, m1) |
| 2282 | mstore(0x40, m2) |
| 2283 | mstore(0x60, m3) |
| 2284 | mstore(0x80, m4) |
| 2285 | mstore(0xa0, m5) |
| 2286 | mstore(0xc0, m6) |
| 2287 | mstore(0xe0, m7) |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | function log(bytes32 p0, bool p1, address p2) internal pure { |
| 2292 | bytes32 m0; |
| 2293 | bytes32 m1; |
| 2294 | bytes32 m2; |
| 2295 | bytes32 m3; |
| 2296 | bytes32 m4; |
| 2297 | bytes32 m5; |
| 2298 | assembly ("memory-safe") { |
| 2299 | function writeString(pos, w) { |
| 2300 | let length := 0 |
| 2301 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2302 | mstore(pos, length) |
| 2303 | let shift := sub(256, shl(3, length)) |
| 2304 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2305 | } |
| 2306 | m0 := mload(0x00) |
| 2307 | m1 := mload(0x20) |
| 2308 | m2 := mload(0x40) |
| 2309 | m3 := mload(0x60) |
| 2310 | m4 := mload(0x80) |
| 2311 | m5 := mload(0xa0) |
| 2312 | // Selector of `log(string,bool,address)`. |
| 2313 | mstore(0x00, 0x932bbb38) |
| 2314 | mstore(0x20, 0x60) |
| 2315 | mstore(0x40, p1) |
| 2316 | mstore(0x60, p2) |
| 2317 | writeString(0x80, p0) |
| 2318 | } |
| 2319 | _sendLogPayload(0x1c, 0xa4); |
| 2320 | assembly ("memory-safe") { |
| 2321 | mstore(0x00, m0) |
| 2322 | mstore(0x20, m1) |
| 2323 | mstore(0x40, m2) |
| 2324 | mstore(0x60, m3) |
| 2325 | mstore(0x80, m4) |
| 2326 | mstore(0xa0, m5) |
| 2327 | } |
| 2328 | } |
| 2329 | |
| 2330 | function log(bytes32 p0, bool p1, bool p2) internal pure { |
| 2331 | bytes32 m0; |
| 2332 | bytes32 m1; |
| 2333 | bytes32 m2; |
| 2334 | bytes32 m3; |
| 2335 | bytes32 m4; |
| 2336 | bytes32 m5; |
| 2337 | assembly ("memory-safe") { |
| 2338 | function writeString(pos, w) { |
| 2339 | let length := 0 |
| 2340 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2341 | mstore(pos, length) |
| 2342 | let shift := sub(256, shl(3, length)) |
| 2343 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2344 | } |
| 2345 | m0 := mload(0x00) |
| 2346 | m1 := mload(0x20) |
| 2347 | m2 := mload(0x40) |
| 2348 | m3 := mload(0x60) |
| 2349 | m4 := mload(0x80) |
| 2350 | m5 := mload(0xa0) |
| 2351 | // Selector of `log(string,bool,bool)`. |
| 2352 | mstore(0x00, 0x850b7ad6) |
| 2353 | mstore(0x20, 0x60) |
| 2354 | mstore(0x40, p1) |
| 2355 | mstore(0x60, p2) |
| 2356 | writeString(0x80, p0) |
| 2357 | } |
| 2358 | _sendLogPayload(0x1c, 0xa4); |
| 2359 | assembly ("memory-safe") { |
| 2360 | mstore(0x00, m0) |
| 2361 | mstore(0x20, m1) |
| 2362 | mstore(0x40, m2) |
| 2363 | mstore(0x60, m3) |
| 2364 | mstore(0x80, m4) |
| 2365 | mstore(0xa0, m5) |
| 2366 | } |
| 2367 | } |
| 2368 | |
| 2369 | function log(bytes32 p0, bool p1, uint256 p2) internal pure { |
| 2370 | bytes32 m0; |
| 2371 | bytes32 m1; |
| 2372 | bytes32 m2; |
| 2373 | bytes32 m3; |
| 2374 | bytes32 m4; |
| 2375 | bytes32 m5; |
| 2376 | assembly ("memory-safe") { |
| 2377 | function writeString(pos, w) { |
| 2378 | let length := 0 |
| 2379 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2380 | mstore(pos, length) |
| 2381 | let shift := sub(256, shl(3, length)) |
| 2382 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2383 | } |
| 2384 | m0 := mload(0x00) |
| 2385 | m1 := mload(0x20) |
| 2386 | m2 := mload(0x40) |
| 2387 | m3 := mload(0x60) |
| 2388 | m4 := mload(0x80) |
| 2389 | m5 := mload(0xa0) |
| 2390 | // Selector of `log(string,bool,uint256)`. |
| 2391 | mstore(0x00, 0xc95958d6) |
| 2392 | mstore(0x20, 0x60) |
| 2393 | mstore(0x40, p1) |
| 2394 | mstore(0x60, p2) |
| 2395 | writeString(0x80, p0) |
| 2396 | } |
| 2397 | _sendLogPayload(0x1c, 0xa4); |
| 2398 | assembly ("memory-safe") { |
| 2399 | mstore(0x00, m0) |
| 2400 | mstore(0x20, m1) |
| 2401 | mstore(0x40, m2) |
| 2402 | mstore(0x60, m3) |
| 2403 | mstore(0x80, m4) |
| 2404 | mstore(0xa0, m5) |
| 2405 | } |
| 2406 | } |
| 2407 | |
| 2408 | function log(bytes32 p0, bool p1, bytes32 p2) internal pure { |
| 2409 | bytes32 m0; |
| 2410 | bytes32 m1; |
| 2411 | bytes32 m2; |
| 2412 | bytes32 m3; |
| 2413 | bytes32 m4; |
| 2414 | bytes32 m5; |
| 2415 | bytes32 m6; |
| 2416 | bytes32 m7; |
| 2417 | assembly ("memory-safe") { |
| 2418 | function writeString(pos, w) { |
| 2419 | let length := 0 |
| 2420 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2421 | mstore(pos, length) |
| 2422 | let shift := sub(256, shl(3, length)) |
| 2423 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2424 | } |
| 2425 | m0 := mload(0x00) |
| 2426 | m1 := mload(0x20) |
| 2427 | m2 := mload(0x40) |
| 2428 | m3 := mload(0x60) |
| 2429 | m4 := mload(0x80) |
| 2430 | m5 := mload(0xa0) |
| 2431 | m6 := mload(0xc0) |
| 2432 | m7 := mload(0xe0) |
| 2433 | // Selector of `log(string,bool,string)`. |
| 2434 | mstore(0x00, 0xe298f47d) |
| 2435 | mstore(0x20, 0x60) |
| 2436 | mstore(0x40, p1) |
| 2437 | mstore(0x60, 0xa0) |
| 2438 | writeString(0x80, p0) |
| 2439 | writeString(0xc0, p2) |
| 2440 | } |
| 2441 | _sendLogPayload(0x1c, 0xe4); |
| 2442 | assembly ("memory-safe") { |
| 2443 | mstore(0x00, m0) |
| 2444 | mstore(0x20, m1) |
| 2445 | mstore(0x40, m2) |
| 2446 | mstore(0x60, m3) |
| 2447 | mstore(0x80, m4) |
| 2448 | mstore(0xa0, m5) |
| 2449 | mstore(0xc0, m6) |
| 2450 | mstore(0xe0, m7) |
| 2451 | } |
| 2452 | } |
| 2453 | |
| 2454 | function log(bytes32 p0, uint256 p1, address p2) internal pure { |
| 2455 | bytes32 m0; |
| 2456 | bytes32 m1; |
| 2457 | bytes32 m2; |
| 2458 | bytes32 m3; |
| 2459 | bytes32 m4; |
| 2460 | bytes32 m5; |
| 2461 | assembly ("memory-safe") { |
| 2462 | function writeString(pos, w) { |
| 2463 | let length := 0 |
| 2464 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2465 | mstore(pos, length) |
| 2466 | let shift := sub(256, shl(3, length)) |
| 2467 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2468 | } |
| 2469 | m0 := mload(0x00) |
| 2470 | m1 := mload(0x20) |
| 2471 | m2 := mload(0x40) |
| 2472 | m3 := mload(0x60) |
| 2473 | m4 := mload(0x80) |
| 2474 | m5 := mload(0xa0) |
| 2475 | // Selector of `log(string,uint256,address)`. |
| 2476 | mstore(0x00, 0x1c7ec448) |
| 2477 | mstore(0x20, 0x60) |
| 2478 | mstore(0x40, p1) |
| 2479 | mstore(0x60, p2) |
| 2480 | writeString(0x80, p0) |
| 2481 | } |
| 2482 | _sendLogPayload(0x1c, 0xa4); |
| 2483 | assembly ("memory-safe") { |
| 2484 | mstore(0x00, m0) |
| 2485 | mstore(0x20, m1) |
| 2486 | mstore(0x40, m2) |
| 2487 | mstore(0x60, m3) |
| 2488 | mstore(0x80, m4) |
| 2489 | mstore(0xa0, m5) |
| 2490 | } |
| 2491 | } |
| 2492 | |
| 2493 | function log(bytes32 p0, uint256 p1, bool p2) internal pure { |
| 2494 | bytes32 m0; |
| 2495 | bytes32 m1; |
| 2496 | bytes32 m2; |
| 2497 | bytes32 m3; |
| 2498 | bytes32 m4; |
| 2499 | bytes32 m5; |
| 2500 | assembly ("memory-safe") { |
| 2501 | function writeString(pos, w) { |
| 2502 | let length := 0 |
| 2503 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2504 | mstore(pos, length) |
| 2505 | let shift := sub(256, shl(3, length)) |
| 2506 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2507 | } |
| 2508 | m0 := mload(0x00) |
| 2509 | m1 := mload(0x20) |
| 2510 | m2 := mload(0x40) |
| 2511 | m3 := mload(0x60) |
| 2512 | m4 := mload(0x80) |
| 2513 | m5 := mload(0xa0) |
| 2514 | // Selector of `log(string,uint256,bool)`. |
| 2515 | mstore(0x00, 0xca7733b1) |
| 2516 | mstore(0x20, 0x60) |
| 2517 | mstore(0x40, p1) |
| 2518 | mstore(0x60, p2) |
| 2519 | writeString(0x80, p0) |
| 2520 | } |
| 2521 | _sendLogPayload(0x1c, 0xa4); |
| 2522 | assembly ("memory-safe") { |
| 2523 | mstore(0x00, m0) |
| 2524 | mstore(0x20, m1) |
| 2525 | mstore(0x40, m2) |
| 2526 | mstore(0x60, m3) |
| 2527 | mstore(0x80, m4) |
| 2528 | mstore(0xa0, m5) |
| 2529 | } |
| 2530 | } |
| 2531 | |
| 2532 | function log(bytes32 p0, uint256 p1, uint256 p2) internal pure { |
| 2533 | bytes32 m0; |
| 2534 | bytes32 m1; |
| 2535 | bytes32 m2; |
| 2536 | bytes32 m3; |
| 2537 | bytes32 m4; |
| 2538 | bytes32 m5; |
| 2539 | assembly ("memory-safe") { |
| 2540 | function writeString(pos, w) { |
| 2541 | let length := 0 |
| 2542 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2543 | mstore(pos, length) |
| 2544 | let shift := sub(256, shl(3, length)) |
| 2545 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2546 | } |
| 2547 | m0 := mload(0x00) |
| 2548 | m1 := mload(0x20) |
| 2549 | m2 := mload(0x40) |
| 2550 | m3 := mload(0x60) |
| 2551 | m4 := mload(0x80) |
| 2552 | m5 := mload(0xa0) |
| 2553 | // Selector of `log(string,uint256,uint256)`. |
| 2554 | mstore(0x00, 0xca47c4eb) |
| 2555 | mstore(0x20, 0x60) |
| 2556 | mstore(0x40, p1) |
| 2557 | mstore(0x60, p2) |
| 2558 | writeString(0x80, p0) |
| 2559 | } |
| 2560 | _sendLogPayload(0x1c, 0xa4); |
| 2561 | assembly ("memory-safe") { |
| 2562 | mstore(0x00, m0) |
| 2563 | mstore(0x20, m1) |
| 2564 | mstore(0x40, m2) |
| 2565 | mstore(0x60, m3) |
| 2566 | mstore(0x80, m4) |
| 2567 | mstore(0xa0, m5) |
| 2568 | } |
| 2569 | } |
| 2570 | |
| 2571 | function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure { |
| 2572 | bytes32 m0; |
| 2573 | bytes32 m1; |
| 2574 | bytes32 m2; |
| 2575 | bytes32 m3; |
| 2576 | bytes32 m4; |
| 2577 | bytes32 m5; |
| 2578 | bytes32 m6; |
| 2579 | bytes32 m7; |
| 2580 | assembly ("memory-safe") { |
| 2581 | function writeString(pos, w) { |
| 2582 | let length := 0 |
| 2583 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2584 | mstore(pos, length) |
| 2585 | let shift := sub(256, shl(3, length)) |
| 2586 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2587 | } |
| 2588 | m0 := mload(0x00) |
| 2589 | m1 := mload(0x20) |
| 2590 | m2 := mload(0x40) |
| 2591 | m3 := mload(0x60) |
| 2592 | m4 := mload(0x80) |
| 2593 | m5 := mload(0xa0) |
| 2594 | m6 := mload(0xc0) |
| 2595 | m7 := mload(0xe0) |
| 2596 | // Selector of `log(string,uint256,string)`. |
| 2597 | mstore(0x00, 0x5970e089) |
| 2598 | mstore(0x20, 0x60) |
| 2599 | mstore(0x40, p1) |
| 2600 | mstore(0x60, 0xa0) |
| 2601 | writeString(0x80, p0) |
| 2602 | writeString(0xc0, p2) |
| 2603 | } |
| 2604 | _sendLogPayload(0x1c, 0xe4); |
| 2605 | assembly ("memory-safe") { |
| 2606 | mstore(0x00, m0) |
| 2607 | mstore(0x20, m1) |
| 2608 | mstore(0x40, m2) |
| 2609 | mstore(0x60, m3) |
| 2610 | mstore(0x80, m4) |
| 2611 | mstore(0xa0, m5) |
| 2612 | mstore(0xc0, m6) |
| 2613 | mstore(0xe0, m7) |
| 2614 | } |
| 2615 | } |
| 2616 | |
| 2617 | function log(bytes32 p0, bytes32 p1, address p2) internal pure { |
| 2618 | bytes32 m0; |
| 2619 | bytes32 m1; |
| 2620 | bytes32 m2; |
| 2621 | bytes32 m3; |
| 2622 | bytes32 m4; |
| 2623 | bytes32 m5; |
| 2624 | bytes32 m6; |
| 2625 | bytes32 m7; |
| 2626 | assembly ("memory-safe") { |
| 2627 | function writeString(pos, w) { |
| 2628 | let length := 0 |
| 2629 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2630 | mstore(pos, length) |
| 2631 | let shift := sub(256, shl(3, length)) |
| 2632 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2633 | } |
| 2634 | m0 := mload(0x00) |
| 2635 | m1 := mload(0x20) |
| 2636 | m2 := mload(0x40) |
| 2637 | m3 := mload(0x60) |
| 2638 | m4 := mload(0x80) |
| 2639 | m5 := mload(0xa0) |
| 2640 | m6 := mload(0xc0) |
| 2641 | m7 := mload(0xe0) |
| 2642 | // Selector of `log(string,string,address)`. |
| 2643 | mstore(0x00, 0x95ed0195) |
| 2644 | mstore(0x20, 0x60) |
| 2645 | mstore(0x40, 0xa0) |
| 2646 | mstore(0x60, p2) |
| 2647 | writeString(0x80, p0) |
| 2648 | writeString(0xc0, p1) |
| 2649 | } |
| 2650 | _sendLogPayload(0x1c, 0xe4); |
| 2651 | assembly ("memory-safe") { |
| 2652 | mstore(0x00, m0) |
| 2653 | mstore(0x20, m1) |
| 2654 | mstore(0x40, m2) |
| 2655 | mstore(0x60, m3) |
| 2656 | mstore(0x80, m4) |
| 2657 | mstore(0xa0, m5) |
| 2658 | mstore(0xc0, m6) |
| 2659 | mstore(0xe0, m7) |
| 2660 | } |
| 2661 | } |
| 2662 | |
| 2663 | function log(bytes32 p0, bytes32 p1, bool p2) internal pure { |
| 2664 | bytes32 m0; |
| 2665 | bytes32 m1; |
| 2666 | bytes32 m2; |
| 2667 | bytes32 m3; |
| 2668 | bytes32 m4; |
| 2669 | bytes32 m5; |
| 2670 | bytes32 m6; |
| 2671 | bytes32 m7; |
| 2672 | assembly ("memory-safe") { |
| 2673 | function writeString(pos, w) { |
| 2674 | let length := 0 |
| 2675 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2676 | mstore(pos, length) |
| 2677 | let shift := sub(256, shl(3, length)) |
| 2678 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2679 | } |
| 2680 | m0 := mload(0x00) |
| 2681 | m1 := mload(0x20) |
| 2682 | m2 := mload(0x40) |
| 2683 | m3 := mload(0x60) |
| 2684 | m4 := mload(0x80) |
| 2685 | m5 := mload(0xa0) |
| 2686 | m6 := mload(0xc0) |
| 2687 | m7 := mload(0xe0) |
| 2688 | // Selector of `log(string,string,bool)`. |
| 2689 | mstore(0x00, 0xb0e0f9b5) |
| 2690 | mstore(0x20, 0x60) |
| 2691 | mstore(0x40, 0xa0) |
| 2692 | mstore(0x60, p2) |
| 2693 | writeString(0x80, p0) |
| 2694 | writeString(0xc0, p1) |
| 2695 | } |
| 2696 | _sendLogPayload(0x1c, 0xe4); |
| 2697 | assembly ("memory-safe") { |
| 2698 | mstore(0x00, m0) |
| 2699 | mstore(0x20, m1) |
| 2700 | mstore(0x40, m2) |
| 2701 | mstore(0x60, m3) |
| 2702 | mstore(0x80, m4) |
| 2703 | mstore(0xa0, m5) |
| 2704 | mstore(0xc0, m6) |
| 2705 | mstore(0xe0, m7) |
| 2706 | } |
| 2707 | } |
| 2708 | |
| 2709 | function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure { |
| 2710 | bytes32 m0; |
| 2711 | bytes32 m1; |
| 2712 | bytes32 m2; |
| 2713 | bytes32 m3; |
| 2714 | bytes32 m4; |
| 2715 | bytes32 m5; |
| 2716 | bytes32 m6; |
| 2717 | bytes32 m7; |
| 2718 | assembly ("memory-safe") { |
| 2719 | function writeString(pos, w) { |
| 2720 | let length := 0 |
| 2721 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2722 | mstore(pos, length) |
| 2723 | let shift := sub(256, shl(3, length)) |
| 2724 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2725 | } |
| 2726 | m0 := mload(0x00) |
| 2727 | m1 := mload(0x20) |
| 2728 | m2 := mload(0x40) |
| 2729 | m3 := mload(0x60) |
| 2730 | m4 := mload(0x80) |
| 2731 | m5 := mload(0xa0) |
| 2732 | m6 := mload(0xc0) |
| 2733 | m7 := mload(0xe0) |
| 2734 | // Selector of `log(string,string,uint256)`. |
| 2735 | mstore(0x00, 0x5821efa1) |
| 2736 | mstore(0x20, 0x60) |
| 2737 | mstore(0x40, 0xa0) |
| 2738 | mstore(0x60, p2) |
| 2739 | writeString(0x80, p0) |
| 2740 | writeString(0xc0, p1) |
| 2741 | } |
| 2742 | _sendLogPayload(0x1c, 0xe4); |
| 2743 | assembly ("memory-safe") { |
| 2744 | mstore(0x00, m0) |
| 2745 | mstore(0x20, m1) |
| 2746 | mstore(0x40, m2) |
| 2747 | mstore(0x60, m3) |
| 2748 | mstore(0x80, m4) |
| 2749 | mstore(0xa0, m5) |
| 2750 | mstore(0xc0, m6) |
| 2751 | mstore(0xe0, m7) |
| 2752 | } |
| 2753 | } |
| 2754 | |
| 2755 | function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure { |
| 2756 | bytes32 m0; |
| 2757 | bytes32 m1; |
| 2758 | bytes32 m2; |
| 2759 | bytes32 m3; |
| 2760 | bytes32 m4; |
| 2761 | bytes32 m5; |
| 2762 | bytes32 m6; |
| 2763 | bytes32 m7; |
| 2764 | bytes32 m8; |
| 2765 | bytes32 m9; |
| 2766 | assembly ("memory-safe") { |
| 2767 | function writeString(pos, w) { |
| 2768 | let length := 0 |
| 2769 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2770 | mstore(pos, length) |
| 2771 | let shift := sub(256, shl(3, length)) |
| 2772 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2773 | } |
| 2774 | m0 := mload(0x00) |
| 2775 | m1 := mload(0x20) |
| 2776 | m2 := mload(0x40) |
| 2777 | m3 := mload(0x60) |
| 2778 | m4 := mload(0x80) |
| 2779 | m5 := mload(0xa0) |
| 2780 | m6 := mload(0xc0) |
| 2781 | m7 := mload(0xe0) |
| 2782 | m8 := mload(0x100) |
| 2783 | m9 := mload(0x120) |
| 2784 | // Selector of `log(string,string,string)`. |
| 2785 | mstore(0x00, 0x2ced7cef) |
| 2786 | mstore(0x20, 0x60) |
| 2787 | mstore(0x40, 0xa0) |
| 2788 | mstore(0x60, 0xe0) |
| 2789 | writeString(0x80, p0) |
| 2790 | writeString(0xc0, p1) |
| 2791 | writeString(0x100, p2) |
| 2792 | } |
| 2793 | _sendLogPayload(0x1c, 0x124); |
| 2794 | assembly ("memory-safe") { |
| 2795 | mstore(0x00, m0) |
| 2796 | mstore(0x20, m1) |
| 2797 | mstore(0x40, m2) |
| 2798 | mstore(0x60, m3) |
| 2799 | mstore(0x80, m4) |
| 2800 | mstore(0xa0, m5) |
| 2801 | mstore(0xc0, m6) |
| 2802 | mstore(0xe0, m7) |
| 2803 | mstore(0x100, m8) |
| 2804 | mstore(0x120, m9) |
| 2805 | } |
| 2806 | } |
| 2807 | |
| 2808 | function log(address p0, address p1, address p2, address p3) internal pure { |
| 2809 | bytes32 m0; |
| 2810 | bytes32 m1; |
| 2811 | bytes32 m2; |
| 2812 | bytes32 m3; |
| 2813 | bytes32 m4; |
| 2814 | assembly ("memory-safe") { |
| 2815 | m0 := mload(0x00) |
| 2816 | m1 := mload(0x20) |
| 2817 | m2 := mload(0x40) |
| 2818 | m3 := mload(0x60) |
| 2819 | m4 := mload(0x80) |
| 2820 | // Selector of `log(address,address,address,address)`. |
| 2821 | mstore(0x00, 0x665bf134) |
| 2822 | mstore(0x20, p0) |
| 2823 | mstore(0x40, p1) |
| 2824 | mstore(0x60, p2) |
| 2825 | mstore(0x80, p3) |
| 2826 | } |
| 2827 | _sendLogPayload(0x1c, 0x84); |
| 2828 | assembly ("memory-safe") { |
| 2829 | mstore(0x00, m0) |
| 2830 | mstore(0x20, m1) |
| 2831 | mstore(0x40, m2) |
| 2832 | mstore(0x60, m3) |
| 2833 | mstore(0x80, m4) |
| 2834 | } |
| 2835 | } |
| 2836 | |
| 2837 | function log(address p0, address p1, address p2, bool p3) internal pure { |
| 2838 | bytes32 m0; |
| 2839 | bytes32 m1; |
| 2840 | bytes32 m2; |
| 2841 | bytes32 m3; |
| 2842 | bytes32 m4; |
| 2843 | assembly ("memory-safe") { |
| 2844 | m0 := mload(0x00) |
| 2845 | m1 := mload(0x20) |
| 2846 | m2 := mload(0x40) |
| 2847 | m3 := mload(0x60) |
| 2848 | m4 := mload(0x80) |
| 2849 | // Selector of `log(address,address,address,bool)`. |
| 2850 | mstore(0x00, 0x0e378994) |
| 2851 | mstore(0x20, p0) |
| 2852 | mstore(0x40, p1) |
| 2853 | mstore(0x60, p2) |
| 2854 | mstore(0x80, p3) |
| 2855 | } |
| 2856 | _sendLogPayload(0x1c, 0x84); |
| 2857 | assembly ("memory-safe") { |
| 2858 | mstore(0x00, m0) |
| 2859 | mstore(0x20, m1) |
| 2860 | mstore(0x40, m2) |
| 2861 | mstore(0x60, m3) |
| 2862 | mstore(0x80, m4) |
| 2863 | } |
| 2864 | } |
| 2865 | |
| 2866 | function log(address p0, address p1, address p2, uint256 p3) internal pure { |
| 2867 | bytes32 m0; |
| 2868 | bytes32 m1; |
| 2869 | bytes32 m2; |
| 2870 | bytes32 m3; |
| 2871 | bytes32 m4; |
| 2872 | assembly ("memory-safe") { |
| 2873 | m0 := mload(0x00) |
| 2874 | m1 := mload(0x20) |
| 2875 | m2 := mload(0x40) |
| 2876 | m3 := mload(0x60) |
| 2877 | m4 := mload(0x80) |
| 2878 | // Selector of `log(address,address,address,uint256)`. |
| 2879 | mstore(0x00, 0x94250d77) |
| 2880 | mstore(0x20, p0) |
| 2881 | mstore(0x40, p1) |
| 2882 | mstore(0x60, p2) |
| 2883 | mstore(0x80, p3) |
| 2884 | } |
| 2885 | _sendLogPayload(0x1c, 0x84); |
| 2886 | assembly ("memory-safe") { |
| 2887 | mstore(0x00, m0) |
| 2888 | mstore(0x20, m1) |
| 2889 | mstore(0x40, m2) |
| 2890 | mstore(0x60, m3) |
| 2891 | mstore(0x80, m4) |
| 2892 | } |
| 2893 | } |
| 2894 | |
| 2895 | function log(address p0, address p1, address p2, bytes32 p3) internal pure { |
| 2896 | bytes32 m0; |
| 2897 | bytes32 m1; |
| 2898 | bytes32 m2; |
| 2899 | bytes32 m3; |
| 2900 | bytes32 m4; |
| 2901 | bytes32 m5; |
| 2902 | bytes32 m6; |
| 2903 | assembly ("memory-safe") { |
| 2904 | function writeString(pos, w) { |
| 2905 | let length := 0 |
| 2906 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 2907 | mstore(pos, length) |
| 2908 | let shift := sub(256, shl(3, length)) |
| 2909 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 2910 | } |
| 2911 | m0 := mload(0x00) |
| 2912 | m1 := mload(0x20) |
| 2913 | m2 := mload(0x40) |
| 2914 | m3 := mload(0x60) |
| 2915 | m4 := mload(0x80) |
| 2916 | m5 := mload(0xa0) |
| 2917 | m6 := mload(0xc0) |
| 2918 | // Selector of `log(address,address,address,string)`. |
| 2919 | mstore(0x00, 0xf808da20) |
| 2920 | mstore(0x20, p0) |
| 2921 | mstore(0x40, p1) |
| 2922 | mstore(0x60, p2) |
| 2923 | mstore(0x80, 0x80) |
| 2924 | writeString(0xa0, p3) |
| 2925 | } |
| 2926 | _sendLogPayload(0x1c, 0xc4); |
| 2927 | assembly ("memory-safe") { |
| 2928 | mstore(0x00, m0) |
| 2929 | mstore(0x20, m1) |
| 2930 | mstore(0x40, m2) |
| 2931 | mstore(0x60, m3) |
| 2932 | mstore(0x80, m4) |
| 2933 | mstore(0xa0, m5) |
| 2934 | mstore(0xc0, m6) |
| 2935 | } |
| 2936 | } |
| 2937 | |
| 2938 | function log(address p0, address p1, bool p2, address p3) internal pure { |
| 2939 | bytes32 m0; |
| 2940 | bytes32 m1; |
| 2941 | bytes32 m2; |
| 2942 | bytes32 m3; |
| 2943 | bytes32 m4; |
| 2944 | assembly ("memory-safe") { |
| 2945 | m0 := mload(0x00) |
| 2946 | m1 := mload(0x20) |
| 2947 | m2 := mload(0x40) |
| 2948 | m3 := mload(0x60) |
| 2949 | m4 := mload(0x80) |
| 2950 | // Selector of `log(address,address,bool,address)`. |
| 2951 | mstore(0x00, 0x9f1bc36e) |
| 2952 | mstore(0x20, p0) |
| 2953 | mstore(0x40, p1) |
| 2954 | mstore(0x60, p2) |
| 2955 | mstore(0x80, p3) |
| 2956 | } |
| 2957 | _sendLogPayload(0x1c, 0x84); |
| 2958 | assembly ("memory-safe") { |
| 2959 | mstore(0x00, m0) |
| 2960 | mstore(0x20, m1) |
| 2961 | mstore(0x40, m2) |
| 2962 | mstore(0x60, m3) |
| 2963 | mstore(0x80, m4) |
| 2964 | } |
| 2965 | } |
| 2966 | |
| 2967 | function log(address p0, address p1, bool p2, bool p3) internal pure { |
| 2968 | bytes32 m0; |
| 2969 | bytes32 m1; |
| 2970 | bytes32 m2; |
| 2971 | bytes32 m3; |
| 2972 | bytes32 m4; |
| 2973 | assembly ("memory-safe") { |
| 2974 | m0 := mload(0x00) |
| 2975 | m1 := mload(0x20) |
| 2976 | m2 := mload(0x40) |
| 2977 | m3 := mload(0x60) |
| 2978 | m4 := mload(0x80) |
| 2979 | // Selector of `log(address,address,bool,bool)`. |
| 2980 | mstore(0x00, 0x2cd4134a) |
| 2981 | mstore(0x20, p0) |
| 2982 | mstore(0x40, p1) |
| 2983 | mstore(0x60, p2) |
| 2984 | mstore(0x80, p3) |
| 2985 | } |
| 2986 | _sendLogPayload(0x1c, 0x84); |
| 2987 | assembly ("memory-safe") { |
| 2988 | mstore(0x00, m0) |
| 2989 | mstore(0x20, m1) |
| 2990 | mstore(0x40, m2) |
| 2991 | mstore(0x60, m3) |
| 2992 | mstore(0x80, m4) |
| 2993 | } |
| 2994 | } |
| 2995 | |
| 2996 | function log(address p0, address p1, bool p2, uint256 p3) internal pure { |
| 2997 | bytes32 m0; |
| 2998 | bytes32 m1; |
| 2999 | bytes32 m2; |
| 3000 | bytes32 m3; |
| 3001 | bytes32 m4; |
| 3002 | assembly ("memory-safe") { |
| 3003 | m0 := mload(0x00) |
| 3004 | m1 := mload(0x20) |
| 3005 | m2 := mload(0x40) |
| 3006 | m3 := mload(0x60) |
| 3007 | m4 := mload(0x80) |
| 3008 | // Selector of `log(address,address,bool,uint256)`. |
| 3009 | mstore(0x00, 0x3971e78c) |
| 3010 | mstore(0x20, p0) |
| 3011 | mstore(0x40, p1) |
| 3012 | mstore(0x60, p2) |
| 3013 | mstore(0x80, p3) |
| 3014 | } |
| 3015 | _sendLogPayload(0x1c, 0x84); |
| 3016 | assembly ("memory-safe") { |
| 3017 | mstore(0x00, m0) |
| 3018 | mstore(0x20, m1) |
| 3019 | mstore(0x40, m2) |
| 3020 | mstore(0x60, m3) |
| 3021 | mstore(0x80, m4) |
| 3022 | } |
| 3023 | } |
| 3024 | |
| 3025 | function log(address p0, address p1, bool p2, bytes32 p3) internal pure { |
| 3026 | bytes32 m0; |
| 3027 | bytes32 m1; |
| 3028 | bytes32 m2; |
| 3029 | bytes32 m3; |
| 3030 | bytes32 m4; |
| 3031 | bytes32 m5; |
| 3032 | bytes32 m6; |
| 3033 | assembly ("memory-safe") { |
| 3034 | function writeString(pos, w) { |
| 3035 | let length := 0 |
| 3036 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3037 | mstore(pos, length) |
| 3038 | let shift := sub(256, shl(3, length)) |
| 3039 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3040 | } |
| 3041 | m0 := mload(0x00) |
| 3042 | m1 := mload(0x20) |
| 3043 | m2 := mload(0x40) |
| 3044 | m3 := mload(0x60) |
| 3045 | m4 := mload(0x80) |
| 3046 | m5 := mload(0xa0) |
| 3047 | m6 := mload(0xc0) |
| 3048 | // Selector of `log(address,address,bool,string)`. |
| 3049 | mstore(0x00, 0xaa6540c8) |
| 3050 | mstore(0x20, p0) |
| 3051 | mstore(0x40, p1) |
| 3052 | mstore(0x60, p2) |
| 3053 | mstore(0x80, 0x80) |
| 3054 | writeString(0xa0, p3) |
| 3055 | } |
| 3056 | _sendLogPayload(0x1c, 0xc4); |
| 3057 | assembly ("memory-safe") { |
| 3058 | mstore(0x00, m0) |
| 3059 | mstore(0x20, m1) |
| 3060 | mstore(0x40, m2) |
| 3061 | mstore(0x60, m3) |
| 3062 | mstore(0x80, m4) |
| 3063 | mstore(0xa0, m5) |
| 3064 | mstore(0xc0, m6) |
| 3065 | } |
| 3066 | } |
| 3067 | |
| 3068 | function log(address p0, address p1, uint256 p2, address p3) internal pure { |
| 3069 | bytes32 m0; |
| 3070 | bytes32 m1; |
| 3071 | bytes32 m2; |
| 3072 | bytes32 m3; |
| 3073 | bytes32 m4; |
| 3074 | assembly ("memory-safe") { |
| 3075 | m0 := mload(0x00) |
| 3076 | m1 := mload(0x20) |
| 3077 | m2 := mload(0x40) |
| 3078 | m3 := mload(0x60) |
| 3079 | m4 := mload(0x80) |
| 3080 | // Selector of `log(address,address,uint256,address)`. |
| 3081 | mstore(0x00, 0x8da6def5) |
| 3082 | mstore(0x20, p0) |
| 3083 | mstore(0x40, p1) |
| 3084 | mstore(0x60, p2) |
| 3085 | mstore(0x80, p3) |
| 3086 | } |
| 3087 | _sendLogPayload(0x1c, 0x84); |
| 3088 | assembly ("memory-safe") { |
| 3089 | mstore(0x00, m0) |
| 3090 | mstore(0x20, m1) |
| 3091 | mstore(0x40, m2) |
| 3092 | mstore(0x60, m3) |
| 3093 | mstore(0x80, m4) |
| 3094 | } |
| 3095 | } |
| 3096 | |
| 3097 | function log(address p0, address p1, uint256 p2, bool p3) internal pure { |
| 3098 | bytes32 m0; |
| 3099 | bytes32 m1; |
| 3100 | bytes32 m2; |
| 3101 | bytes32 m3; |
| 3102 | bytes32 m4; |
| 3103 | assembly ("memory-safe") { |
| 3104 | m0 := mload(0x00) |
| 3105 | m1 := mload(0x20) |
| 3106 | m2 := mload(0x40) |
| 3107 | m3 := mload(0x60) |
| 3108 | m4 := mload(0x80) |
| 3109 | // Selector of `log(address,address,uint256,bool)`. |
| 3110 | mstore(0x00, 0x9b4254e2) |
| 3111 | mstore(0x20, p0) |
| 3112 | mstore(0x40, p1) |
| 3113 | mstore(0x60, p2) |
| 3114 | mstore(0x80, p3) |
| 3115 | } |
| 3116 | _sendLogPayload(0x1c, 0x84); |
| 3117 | assembly ("memory-safe") { |
| 3118 | mstore(0x00, m0) |
| 3119 | mstore(0x20, m1) |
| 3120 | mstore(0x40, m2) |
| 3121 | mstore(0x60, m3) |
| 3122 | mstore(0x80, m4) |
| 3123 | } |
| 3124 | } |
| 3125 | |
| 3126 | function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 3127 | bytes32 m0; |
| 3128 | bytes32 m1; |
| 3129 | bytes32 m2; |
| 3130 | bytes32 m3; |
| 3131 | bytes32 m4; |
| 3132 | assembly ("memory-safe") { |
| 3133 | m0 := mload(0x00) |
| 3134 | m1 := mload(0x20) |
| 3135 | m2 := mload(0x40) |
| 3136 | m3 := mload(0x60) |
| 3137 | m4 := mload(0x80) |
| 3138 | // Selector of `log(address,address,uint256,uint256)`. |
| 3139 | mstore(0x00, 0xbe553481) |
| 3140 | mstore(0x20, p0) |
| 3141 | mstore(0x40, p1) |
| 3142 | mstore(0x60, p2) |
| 3143 | mstore(0x80, p3) |
| 3144 | } |
| 3145 | _sendLogPayload(0x1c, 0x84); |
| 3146 | assembly ("memory-safe") { |
| 3147 | mstore(0x00, m0) |
| 3148 | mstore(0x20, m1) |
| 3149 | mstore(0x40, m2) |
| 3150 | mstore(0x60, m3) |
| 3151 | mstore(0x80, m4) |
| 3152 | } |
| 3153 | } |
| 3154 | |
| 3155 | function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure { |
| 3156 | bytes32 m0; |
| 3157 | bytes32 m1; |
| 3158 | bytes32 m2; |
| 3159 | bytes32 m3; |
| 3160 | bytes32 m4; |
| 3161 | bytes32 m5; |
| 3162 | bytes32 m6; |
| 3163 | assembly ("memory-safe") { |
| 3164 | function writeString(pos, w) { |
| 3165 | let length := 0 |
| 3166 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3167 | mstore(pos, length) |
| 3168 | let shift := sub(256, shl(3, length)) |
| 3169 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3170 | } |
| 3171 | m0 := mload(0x00) |
| 3172 | m1 := mload(0x20) |
| 3173 | m2 := mload(0x40) |
| 3174 | m3 := mload(0x60) |
| 3175 | m4 := mload(0x80) |
| 3176 | m5 := mload(0xa0) |
| 3177 | m6 := mload(0xc0) |
| 3178 | // Selector of `log(address,address,uint256,string)`. |
| 3179 | mstore(0x00, 0xfdb4f990) |
| 3180 | mstore(0x20, p0) |
| 3181 | mstore(0x40, p1) |
| 3182 | mstore(0x60, p2) |
| 3183 | mstore(0x80, 0x80) |
| 3184 | writeString(0xa0, p3) |
| 3185 | } |
| 3186 | _sendLogPayload(0x1c, 0xc4); |
| 3187 | assembly ("memory-safe") { |
| 3188 | mstore(0x00, m0) |
| 3189 | mstore(0x20, m1) |
| 3190 | mstore(0x40, m2) |
| 3191 | mstore(0x60, m3) |
| 3192 | mstore(0x80, m4) |
| 3193 | mstore(0xa0, m5) |
| 3194 | mstore(0xc0, m6) |
| 3195 | } |
| 3196 | } |
| 3197 | |
| 3198 | function log(address p0, address p1, bytes32 p2, address p3) internal pure { |
| 3199 | bytes32 m0; |
| 3200 | bytes32 m1; |
| 3201 | bytes32 m2; |
| 3202 | bytes32 m3; |
| 3203 | bytes32 m4; |
| 3204 | bytes32 m5; |
| 3205 | bytes32 m6; |
| 3206 | assembly ("memory-safe") { |
| 3207 | function writeString(pos, w) { |
| 3208 | let length := 0 |
| 3209 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3210 | mstore(pos, length) |
| 3211 | let shift := sub(256, shl(3, length)) |
| 3212 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3213 | } |
| 3214 | m0 := mload(0x00) |
| 3215 | m1 := mload(0x20) |
| 3216 | m2 := mload(0x40) |
| 3217 | m3 := mload(0x60) |
| 3218 | m4 := mload(0x80) |
| 3219 | m5 := mload(0xa0) |
| 3220 | m6 := mload(0xc0) |
| 3221 | // Selector of `log(address,address,string,address)`. |
| 3222 | mstore(0x00, 0x8f736d16) |
| 3223 | mstore(0x20, p0) |
| 3224 | mstore(0x40, p1) |
| 3225 | mstore(0x60, 0x80) |
| 3226 | mstore(0x80, p3) |
| 3227 | writeString(0xa0, p2) |
| 3228 | } |
| 3229 | _sendLogPayload(0x1c, 0xc4); |
| 3230 | assembly ("memory-safe") { |
| 3231 | mstore(0x00, m0) |
| 3232 | mstore(0x20, m1) |
| 3233 | mstore(0x40, m2) |
| 3234 | mstore(0x60, m3) |
| 3235 | mstore(0x80, m4) |
| 3236 | mstore(0xa0, m5) |
| 3237 | mstore(0xc0, m6) |
| 3238 | } |
| 3239 | } |
| 3240 | |
| 3241 | function log(address p0, address p1, bytes32 p2, bool p3) internal pure { |
| 3242 | bytes32 m0; |
| 3243 | bytes32 m1; |
| 3244 | bytes32 m2; |
| 3245 | bytes32 m3; |
| 3246 | bytes32 m4; |
| 3247 | bytes32 m5; |
| 3248 | bytes32 m6; |
| 3249 | assembly ("memory-safe") { |
| 3250 | function writeString(pos, w) { |
| 3251 | let length := 0 |
| 3252 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3253 | mstore(pos, length) |
| 3254 | let shift := sub(256, shl(3, length)) |
| 3255 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3256 | } |
| 3257 | m0 := mload(0x00) |
| 3258 | m1 := mload(0x20) |
| 3259 | m2 := mload(0x40) |
| 3260 | m3 := mload(0x60) |
| 3261 | m4 := mload(0x80) |
| 3262 | m5 := mload(0xa0) |
| 3263 | m6 := mload(0xc0) |
| 3264 | // Selector of `log(address,address,string,bool)`. |
| 3265 | mstore(0x00, 0x6f1a594e) |
| 3266 | mstore(0x20, p0) |
| 3267 | mstore(0x40, p1) |
| 3268 | mstore(0x60, 0x80) |
| 3269 | mstore(0x80, p3) |
| 3270 | writeString(0xa0, p2) |
| 3271 | } |
| 3272 | _sendLogPayload(0x1c, 0xc4); |
| 3273 | assembly ("memory-safe") { |
| 3274 | mstore(0x00, m0) |
| 3275 | mstore(0x20, m1) |
| 3276 | mstore(0x40, m2) |
| 3277 | mstore(0x60, m3) |
| 3278 | mstore(0x80, m4) |
| 3279 | mstore(0xa0, m5) |
| 3280 | mstore(0xc0, m6) |
| 3281 | } |
| 3282 | } |
| 3283 | |
| 3284 | function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure { |
| 3285 | bytes32 m0; |
| 3286 | bytes32 m1; |
| 3287 | bytes32 m2; |
| 3288 | bytes32 m3; |
| 3289 | bytes32 m4; |
| 3290 | bytes32 m5; |
| 3291 | bytes32 m6; |
| 3292 | assembly ("memory-safe") { |
| 3293 | function writeString(pos, w) { |
| 3294 | let length := 0 |
| 3295 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3296 | mstore(pos, length) |
| 3297 | let shift := sub(256, shl(3, length)) |
| 3298 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3299 | } |
| 3300 | m0 := mload(0x00) |
| 3301 | m1 := mload(0x20) |
| 3302 | m2 := mload(0x40) |
| 3303 | m3 := mload(0x60) |
| 3304 | m4 := mload(0x80) |
| 3305 | m5 := mload(0xa0) |
| 3306 | m6 := mload(0xc0) |
| 3307 | // Selector of `log(address,address,string,uint256)`. |
| 3308 | mstore(0x00, 0xef1cefe7) |
| 3309 | mstore(0x20, p0) |
| 3310 | mstore(0x40, p1) |
| 3311 | mstore(0x60, 0x80) |
| 3312 | mstore(0x80, p3) |
| 3313 | writeString(0xa0, p2) |
| 3314 | } |
| 3315 | _sendLogPayload(0x1c, 0xc4); |
| 3316 | assembly ("memory-safe") { |
| 3317 | mstore(0x00, m0) |
| 3318 | mstore(0x20, m1) |
| 3319 | mstore(0x40, m2) |
| 3320 | mstore(0x60, m3) |
| 3321 | mstore(0x80, m4) |
| 3322 | mstore(0xa0, m5) |
| 3323 | mstore(0xc0, m6) |
| 3324 | } |
| 3325 | } |
| 3326 | |
| 3327 | function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure { |
| 3328 | bytes32 m0; |
| 3329 | bytes32 m1; |
| 3330 | bytes32 m2; |
| 3331 | bytes32 m3; |
| 3332 | bytes32 m4; |
| 3333 | bytes32 m5; |
| 3334 | bytes32 m6; |
| 3335 | bytes32 m7; |
| 3336 | bytes32 m8; |
| 3337 | assembly ("memory-safe") { |
| 3338 | function writeString(pos, w) { |
| 3339 | let length := 0 |
| 3340 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3341 | mstore(pos, length) |
| 3342 | let shift := sub(256, shl(3, length)) |
| 3343 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3344 | } |
| 3345 | m0 := mload(0x00) |
| 3346 | m1 := mload(0x20) |
| 3347 | m2 := mload(0x40) |
| 3348 | m3 := mload(0x60) |
| 3349 | m4 := mload(0x80) |
| 3350 | m5 := mload(0xa0) |
| 3351 | m6 := mload(0xc0) |
| 3352 | m7 := mload(0xe0) |
| 3353 | m8 := mload(0x100) |
| 3354 | // Selector of `log(address,address,string,string)`. |
| 3355 | mstore(0x00, 0x21bdaf25) |
| 3356 | mstore(0x20, p0) |
| 3357 | mstore(0x40, p1) |
| 3358 | mstore(0x60, 0x80) |
| 3359 | mstore(0x80, 0xc0) |
| 3360 | writeString(0xa0, p2) |
| 3361 | writeString(0xe0, p3) |
| 3362 | } |
| 3363 | _sendLogPayload(0x1c, 0x104); |
| 3364 | assembly ("memory-safe") { |
| 3365 | mstore(0x00, m0) |
| 3366 | mstore(0x20, m1) |
| 3367 | mstore(0x40, m2) |
| 3368 | mstore(0x60, m3) |
| 3369 | mstore(0x80, m4) |
| 3370 | mstore(0xa0, m5) |
| 3371 | mstore(0xc0, m6) |
| 3372 | mstore(0xe0, m7) |
| 3373 | mstore(0x100, m8) |
| 3374 | } |
| 3375 | } |
| 3376 | |
| 3377 | function log(address p0, bool p1, address p2, address p3) internal pure { |
| 3378 | bytes32 m0; |
| 3379 | bytes32 m1; |
| 3380 | bytes32 m2; |
| 3381 | bytes32 m3; |
| 3382 | bytes32 m4; |
| 3383 | assembly ("memory-safe") { |
| 3384 | m0 := mload(0x00) |
| 3385 | m1 := mload(0x20) |
| 3386 | m2 := mload(0x40) |
| 3387 | m3 := mload(0x60) |
| 3388 | m4 := mload(0x80) |
| 3389 | // Selector of `log(address,bool,address,address)`. |
| 3390 | mstore(0x00, 0x660375dd) |
| 3391 | mstore(0x20, p0) |
| 3392 | mstore(0x40, p1) |
| 3393 | mstore(0x60, p2) |
| 3394 | mstore(0x80, p3) |
| 3395 | } |
| 3396 | _sendLogPayload(0x1c, 0x84); |
| 3397 | assembly ("memory-safe") { |
| 3398 | mstore(0x00, m0) |
| 3399 | mstore(0x20, m1) |
| 3400 | mstore(0x40, m2) |
| 3401 | mstore(0x60, m3) |
| 3402 | mstore(0x80, m4) |
| 3403 | } |
| 3404 | } |
| 3405 | |
| 3406 | function log(address p0, bool p1, address p2, bool p3) internal pure { |
| 3407 | bytes32 m0; |
| 3408 | bytes32 m1; |
| 3409 | bytes32 m2; |
| 3410 | bytes32 m3; |
| 3411 | bytes32 m4; |
| 3412 | assembly ("memory-safe") { |
| 3413 | m0 := mload(0x00) |
| 3414 | m1 := mload(0x20) |
| 3415 | m2 := mload(0x40) |
| 3416 | m3 := mload(0x60) |
| 3417 | m4 := mload(0x80) |
| 3418 | // Selector of `log(address,bool,address,bool)`. |
| 3419 | mstore(0x00, 0xa6f50b0f) |
| 3420 | mstore(0x20, p0) |
| 3421 | mstore(0x40, p1) |
| 3422 | mstore(0x60, p2) |
| 3423 | mstore(0x80, p3) |
| 3424 | } |
| 3425 | _sendLogPayload(0x1c, 0x84); |
| 3426 | assembly ("memory-safe") { |
| 3427 | mstore(0x00, m0) |
| 3428 | mstore(0x20, m1) |
| 3429 | mstore(0x40, m2) |
| 3430 | mstore(0x60, m3) |
| 3431 | mstore(0x80, m4) |
| 3432 | } |
| 3433 | } |
| 3434 | |
| 3435 | function log(address p0, bool p1, address p2, uint256 p3) internal pure { |
| 3436 | bytes32 m0; |
| 3437 | bytes32 m1; |
| 3438 | bytes32 m2; |
| 3439 | bytes32 m3; |
| 3440 | bytes32 m4; |
| 3441 | assembly ("memory-safe") { |
| 3442 | m0 := mload(0x00) |
| 3443 | m1 := mload(0x20) |
| 3444 | m2 := mload(0x40) |
| 3445 | m3 := mload(0x60) |
| 3446 | m4 := mload(0x80) |
| 3447 | // Selector of `log(address,bool,address,uint256)`. |
| 3448 | mstore(0x00, 0xa75c59de) |
| 3449 | mstore(0x20, p0) |
| 3450 | mstore(0x40, p1) |
| 3451 | mstore(0x60, p2) |
| 3452 | mstore(0x80, p3) |
| 3453 | } |
| 3454 | _sendLogPayload(0x1c, 0x84); |
| 3455 | assembly ("memory-safe") { |
| 3456 | mstore(0x00, m0) |
| 3457 | mstore(0x20, m1) |
| 3458 | mstore(0x40, m2) |
| 3459 | mstore(0x60, m3) |
| 3460 | mstore(0x80, m4) |
| 3461 | } |
| 3462 | } |
| 3463 | |
| 3464 | function log(address p0, bool p1, address p2, bytes32 p3) internal pure { |
| 3465 | bytes32 m0; |
| 3466 | bytes32 m1; |
| 3467 | bytes32 m2; |
| 3468 | bytes32 m3; |
| 3469 | bytes32 m4; |
| 3470 | bytes32 m5; |
| 3471 | bytes32 m6; |
| 3472 | assembly ("memory-safe") { |
| 3473 | function writeString(pos, w) { |
| 3474 | let length := 0 |
| 3475 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3476 | mstore(pos, length) |
| 3477 | let shift := sub(256, shl(3, length)) |
| 3478 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3479 | } |
| 3480 | m0 := mload(0x00) |
| 3481 | m1 := mload(0x20) |
| 3482 | m2 := mload(0x40) |
| 3483 | m3 := mload(0x60) |
| 3484 | m4 := mload(0x80) |
| 3485 | m5 := mload(0xa0) |
| 3486 | m6 := mload(0xc0) |
| 3487 | // Selector of `log(address,bool,address,string)`. |
| 3488 | mstore(0x00, 0x2dd778e6) |
| 3489 | mstore(0x20, p0) |
| 3490 | mstore(0x40, p1) |
| 3491 | mstore(0x60, p2) |
| 3492 | mstore(0x80, 0x80) |
| 3493 | writeString(0xa0, p3) |
| 3494 | } |
| 3495 | _sendLogPayload(0x1c, 0xc4); |
| 3496 | assembly ("memory-safe") { |
| 3497 | mstore(0x00, m0) |
| 3498 | mstore(0x20, m1) |
| 3499 | mstore(0x40, m2) |
| 3500 | mstore(0x60, m3) |
| 3501 | mstore(0x80, m4) |
| 3502 | mstore(0xa0, m5) |
| 3503 | mstore(0xc0, m6) |
| 3504 | } |
| 3505 | } |
| 3506 | |
| 3507 | function log(address p0, bool p1, bool p2, address p3) internal pure { |
| 3508 | bytes32 m0; |
| 3509 | bytes32 m1; |
| 3510 | bytes32 m2; |
| 3511 | bytes32 m3; |
| 3512 | bytes32 m4; |
| 3513 | assembly ("memory-safe") { |
| 3514 | m0 := mload(0x00) |
| 3515 | m1 := mload(0x20) |
| 3516 | m2 := mload(0x40) |
| 3517 | m3 := mload(0x60) |
| 3518 | m4 := mload(0x80) |
| 3519 | // Selector of `log(address,bool,bool,address)`. |
| 3520 | mstore(0x00, 0xcf394485) |
| 3521 | mstore(0x20, p0) |
| 3522 | mstore(0x40, p1) |
| 3523 | mstore(0x60, p2) |
| 3524 | mstore(0x80, p3) |
| 3525 | } |
| 3526 | _sendLogPayload(0x1c, 0x84); |
| 3527 | assembly ("memory-safe") { |
| 3528 | mstore(0x00, m0) |
| 3529 | mstore(0x20, m1) |
| 3530 | mstore(0x40, m2) |
| 3531 | mstore(0x60, m3) |
| 3532 | mstore(0x80, m4) |
| 3533 | } |
| 3534 | } |
| 3535 | |
| 3536 | function log(address p0, bool p1, bool p2, bool p3) internal pure { |
| 3537 | bytes32 m0; |
| 3538 | bytes32 m1; |
| 3539 | bytes32 m2; |
| 3540 | bytes32 m3; |
| 3541 | bytes32 m4; |
| 3542 | assembly ("memory-safe") { |
| 3543 | m0 := mload(0x00) |
| 3544 | m1 := mload(0x20) |
| 3545 | m2 := mload(0x40) |
| 3546 | m3 := mload(0x60) |
| 3547 | m4 := mload(0x80) |
| 3548 | // Selector of `log(address,bool,bool,bool)`. |
| 3549 | mstore(0x00, 0xcac43479) |
| 3550 | mstore(0x20, p0) |
| 3551 | mstore(0x40, p1) |
| 3552 | mstore(0x60, p2) |
| 3553 | mstore(0x80, p3) |
| 3554 | } |
| 3555 | _sendLogPayload(0x1c, 0x84); |
| 3556 | assembly ("memory-safe") { |
| 3557 | mstore(0x00, m0) |
| 3558 | mstore(0x20, m1) |
| 3559 | mstore(0x40, m2) |
| 3560 | mstore(0x60, m3) |
| 3561 | mstore(0x80, m4) |
| 3562 | } |
| 3563 | } |
| 3564 | |
| 3565 | function log(address p0, bool p1, bool p2, uint256 p3) internal pure { |
| 3566 | bytes32 m0; |
| 3567 | bytes32 m1; |
| 3568 | bytes32 m2; |
| 3569 | bytes32 m3; |
| 3570 | bytes32 m4; |
| 3571 | assembly ("memory-safe") { |
| 3572 | m0 := mload(0x00) |
| 3573 | m1 := mload(0x20) |
| 3574 | m2 := mload(0x40) |
| 3575 | m3 := mload(0x60) |
| 3576 | m4 := mload(0x80) |
| 3577 | // Selector of `log(address,bool,bool,uint256)`. |
| 3578 | mstore(0x00, 0x8c4e5de6) |
| 3579 | mstore(0x20, p0) |
| 3580 | mstore(0x40, p1) |
| 3581 | mstore(0x60, p2) |
| 3582 | mstore(0x80, p3) |
| 3583 | } |
| 3584 | _sendLogPayload(0x1c, 0x84); |
| 3585 | assembly ("memory-safe") { |
| 3586 | mstore(0x00, m0) |
| 3587 | mstore(0x20, m1) |
| 3588 | mstore(0x40, m2) |
| 3589 | mstore(0x60, m3) |
| 3590 | mstore(0x80, m4) |
| 3591 | } |
| 3592 | } |
| 3593 | |
| 3594 | function log(address p0, bool p1, bool p2, bytes32 p3) internal pure { |
| 3595 | bytes32 m0; |
| 3596 | bytes32 m1; |
| 3597 | bytes32 m2; |
| 3598 | bytes32 m3; |
| 3599 | bytes32 m4; |
| 3600 | bytes32 m5; |
| 3601 | bytes32 m6; |
| 3602 | assembly ("memory-safe") { |
| 3603 | function writeString(pos, w) { |
| 3604 | let length := 0 |
| 3605 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3606 | mstore(pos, length) |
| 3607 | let shift := sub(256, shl(3, length)) |
| 3608 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3609 | } |
| 3610 | m0 := mload(0x00) |
| 3611 | m1 := mload(0x20) |
| 3612 | m2 := mload(0x40) |
| 3613 | m3 := mload(0x60) |
| 3614 | m4 := mload(0x80) |
| 3615 | m5 := mload(0xa0) |
| 3616 | m6 := mload(0xc0) |
| 3617 | // Selector of `log(address,bool,bool,string)`. |
| 3618 | mstore(0x00, 0xdfc4a2e8) |
| 3619 | mstore(0x20, p0) |
| 3620 | mstore(0x40, p1) |
| 3621 | mstore(0x60, p2) |
| 3622 | mstore(0x80, 0x80) |
| 3623 | writeString(0xa0, p3) |
| 3624 | } |
| 3625 | _sendLogPayload(0x1c, 0xc4); |
| 3626 | assembly ("memory-safe") { |
| 3627 | mstore(0x00, m0) |
| 3628 | mstore(0x20, m1) |
| 3629 | mstore(0x40, m2) |
| 3630 | mstore(0x60, m3) |
| 3631 | mstore(0x80, m4) |
| 3632 | mstore(0xa0, m5) |
| 3633 | mstore(0xc0, m6) |
| 3634 | } |
| 3635 | } |
| 3636 | |
| 3637 | function log(address p0, bool p1, uint256 p2, address p3) internal pure { |
| 3638 | bytes32 m0; |
| 3639 | bytes32 m1; |
| 3640 | bytes32 m2; |
| 3641 | bytes32 m3; |
| 3642 | bytes32 m4; |
| 3643 | assembly ("memory-safe") { |
| 3644 | m0 := mload(0x00) |
| 3645 | m1 := mload(0x20) |
| 3646 | m2 := mload(0x40) |
| 3647 | m3 := mload(0x60) |
| 3648 | m4 := mload(0x80) |
| 3649 | // Selector of `log(address,bool,uint256,address)`. |
| 3650 | mstore(0x00, 0xccf790a1) |
| 3651 | mstore(0x20, p0) |
| 3652 | mstore(0x40, p1) |
| 3653 | mstore(0x60, p2) |
| 3654 | mstore(0x80, p3) |
| 3655 | } |
| 3656 | _sendLogPayload(0x1c, 0x84); |
| 3657 | assembly ("memory-safe") { |
| 3658 | mstore(0x00, m0) |
| 3659 | mstore(0x20, m1) |
| 3660 | mstore(0x40, m2) |
| 3661 | mstore(0x60, m3) |
| 3662 | mstore(0x80, m4) |
| 3663 | } |
| 3664 | } |
| 3665 | |
| 3666 | function log(address p0, bool p1, uint256 p2, bool p3) internal pure { |
| 3667 | bytes32 m0; |
| 3668 | bytes32 m1; |
| 3669 | bytes32 m2; |
| 3670 | bytes32 m3; |
| 3671 | bytes32 m4; |
| 3672 | assembly ("memory-safe") { |
| 3673 | m0 := mload(0x00) |
| 3674 | m1 := mload(0x20) |
| 3675 | m2 := mload(0x40) |
| 3676 | m3 := mload(0x60) |
| 3677 | m4 := mload(0x80) |
| 3678 | // Selector of `log(address,bool,uint256,bool)`. |
| 3679 | mstore(0x00, 0xc4643e20) |
| 3680 | mstore(0x20, p0) |
| 3681 | mstore(0x40, p1) |
| 3682 | mstore(0x60, p2) |
| 3683 | mstore(0x80, p3) |
| 3684 | } |
| 3685 | _sendLogPayload(0x1c, 0x84); |
| 3686 | assembly ("memory-safe") { |
| 3687 | mstore(0x00, m0) |
| 3688 | mstore(0x20, m1) |
| 3689 | mstore(0x40, m2) |
| 3690 | mstore(0x60, m3) |
| 3691 | mstore(0x80, m4) |
| 3692 | } |
| 3693 | } |
| 3694 | |
| 3695 | function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 3696 | bytes32 m0; |
| 3697 | bytes32 m1; |
| 3698 | bytes32 m2; |
| 3699 | bytes32 m3; |
| 3700 | bytes32 m4; |
| 3701 | assembly ("memory-safe") { |
| 3702 | m0 := mload(0x00) |
| 3703 | m1 := mload(0x20) |
| 3704 | m2 := mload(0x40) |
| 3705 | m3 := mload(0x60) |
| 3706 | m4 := mload(0x80) |
| 3707 | // Selector of `log(address,bool,uint256,uint256)`. |
| 3708 | mstore(0x00, 0x386ff5f4) |
| 3709 | mstore(0x20, p0) |
| 3710 | mstore(0x40, p1) |
| 3711 | mstore(0x60, p2) |
| 3712 | mstore(0x80, p3) |
| 3713 | } |
| 3714 | _sendLogPayload(0x1c, 0x84); |
| 3715 | assembly ("memory-safe") { |
| 3716 | mstore(0x00, m0) |
| 3717 | mstore(0x20, m1) |
| 3718 | mstore(0x40, m2) |
| 3719 | mstore(0x60, m3) |
| 3720 | mstore(0x80, m4) |
| 3721 | } |
| 3722 | } |
| 3723 | |
| 3724 | function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure { |
| 3725 | bytes32 m0; |
| 3726 | bytes32 m1; |
| 3727 | bytes32 m2; |
| 3728 | bytes32 m3; |
| 3729 | bytes32 m4; |
| 3730 | bytes32 m5; |
| 3731 | bytes32 m6; |
| 3732 | assembly ("memory-safe") { |
| 3733 | function writeString(pos, w) { |
| 3734 | let length := 0 |
| 3735 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3736 | mstore(pos, length) |
| 3737 | let shift := sub(256, shl(3, length)) |
| 3738 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3739 | } |
| 3740 | m0 := mload(0x00) |
| 3741 | m1 := mload(0x20) |
| 3742 | m2 := mload(0x40) |
| 3743 | m3 := mload(0x60) |
| 3744 | m4 := mload(0x80) |
| 3745 | m5 := mload(0xa0) |
| 3746 | m6 := mload(0xc0) |
| 3747 | // Selector of `log(address,bool,uint256,string)`. |
| 3748 | mstore(0x00, 0x0aa6cfad) |
| 3749 | mstore(0x20, p0) |
| 3750 | mstore(0x40, p1) |
| 3751 | mstore(0x60, p2) |
| 3752 | mstore(0x80, 0x80) |
| 3753 | writeString(0xa0, p3) |
| 3754 | } |
| 3755 | _sendLogPayload(0x1c, 0xc4); |
| 3756 | assembly ("memory-safe") { |
| 3757 | mstore(0x00, m0) |
| 3758 | mstore(0x20, m1) |
| 3759 | mstore(0x40, m2) |
| 3760 | mstore(0x60, m3) |
| 3761 | mstore(0x80, m4) |
| 3762 | mstore(0xa0, m5) |
| 3763 | mstore(0xc0, m6) |
| 3764 | } |
| 3765 | } |
| 3766 | |
| 3767 | function log(address p0, bool p1, bytes32 p2, address p3) internal pure { |
| 3768 | bytes32 m0; |
| 3769 | bytes32 m1; |
| 3770 | bytes32 m2; |
| 3771 | bytes32 m3; |
| 3772 | bytes32 m4; |
| 3773 | bytes32 m5; |
| 3774 | bytes32 m6; |
| 3775 | assembly ("memory-safe") { |
| 3776 | function writeString(pos, w) { |
| 3777 | let length := 0 |
| 3778 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3779 | mstore(pos, length) |
| 3780 | let shift := sub(256, shl(3, length)) |
| 3781 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3782 | } |
| 3783 | m0 := mload(0x00) |
| 3784 | m1 := mload(0x20) |
| 3785 | m2 := mload(0x40) |
| 3786 | m3 := mload(0x60) |
| 3787 | m4 := mload(0x80) |
| 3788 | m5 := mload(0xa0) |
| 3789 | m6 := mload(0xc0) |
| 3790 | // Selector of `log(address,bool,string,address)`. |
| 3791 | mstore(0x00, 0x19fd4956) |
| 3792 | mstore(0x20, p0) |
| 3793 | mstore(0x40, p1) |
| 3794 | mstore(0x60, 0x80) |
| 3795 | mstore(0x80, p3) |
| 3796 | writeString(0xa0, p2) |
| 3797 | } |
| 3798 | _sendLogPayload(0x1c, 0xc4); |
| 3799 | assembly ("memory-safe") { |
| 3800 | mstore(0x00, m0) |
| 3801 | mstore(0x20, m1) |
| 3802 | mstore(0x40, m2) |
| 3803 | mstore(0x60, m3) |
| 3804 | mstore(0x80, m4) |
| 3805 | mstore(0xa0, m5) |
| 3806 | mstore(0xc0, m6) |
| 3807 | } |
| 3808 | } |
| 3809 | |
| 3810 | function log(address p0, bool p1, bytes32 p2, bool p3) internal pure { |
| 3811 | bytes32 m0; |
| 3812 | bytes32 m1; |
| 3813 | bytes32 m2; |
| 3814 | bytes32 m3; |
| 3815 | bytes32 m4; |
| 3816 | bytes32 m5; |
| 3817 | bytes32 m6; |
| 3818 | assembly ("memory-safe") { |
| 3819 | function writeString(pos, w) { |
| 3820 | let length := 0 |
| 3821 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3822 | mstore(pos, length) |
| 3823 | let shift := sub(256, shl(3, length)) |
| 3824 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3825 | } |
| 3826 | m0 := mload(0x00) |
| 3827 | m1 := mload(0x20) |
| 3828 | m2 := mload(0x40) |
| 3829 | m3 := mload(0x60) |
| 3830 | m4 := mload(0x80) |
| 3831 | m5 := mload(0xa0) |
| 3832 | m6 := mload(0xc0) |
| 3833 | // Selector of `log(address,bool,string,bool)`. |
| 3834 | mstore(0x00, 0x50ad461d) |
| 3835 | mstore(0x20, p0) |
| 3836 | mstore(0x40, p1) |
| 3837 | mstore(0x60, 0x80) |
| 3838 | mstore(0x80, p3) |
| 3839 | writeString(0xa0, p2) |
| 3840 | } |
| 3841 | _sendLogPayload(0x1c, 0xc4); |
| 3842 | assembly ("memory-safe") { |
| 3843 | mstore(0x00, m0) |
| 3844 | mstore(0x20, m1) |
| 3845 | mstore(0x40, m2) |
| 3846 | mstore(0x60, m3) |
| 3847 | mstore(0x80, m4) |
| 3848 | mstore(0xa0, m5) |
| 3849 | mstore(0xc0, m6) |
| 3850 | } |
| 3851 | } |
| 3852 | |
| 3853 | function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure { |
| 3854 | bytes32 m0; |
| 3855 | bytes32 m1; |
| 3856 | bytes32 m2; |
| 3857 | bytes32 m3; |
| 3858 | bytes32 m4; |
| 3859 | bytes32 m5; |
| 3860 | bytes32 m6; |
| 3861 | assembly ("memory-safe") { |
| 3862 | function writeString(pos, w) { |
| 3863 | let length := 0 |
| 3864 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3865 | mstore(pos, length) |
| 3866 | let shift := sub(256, shl(3, length)) |
| 3867 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3868 | } |
| 3869 | m0 := mload(0x00) |
| 3870 | m1 := mload(0x20) |
| 3871 | m2 := mload(0x40) |
| 3872 | m3 := mload(0x60) |
| 3873 | m4 := mload(0x80) |
| 3874 | m5 := mload(0xa0) |
| 3875 | m6 := mload(0xc0) |
| 3876 | // Selector of `log(address,bool,string,uint256)`. |
| 3877 | mstore(0x00, 0x80e6a20b) |
| 3878 | mstore(0x20, p0) |
| 3879 | mstore(0x40, p1) |
| 3880 | mstore(0x60, 0x80) |
| 3881 | mstore(0x80, p3) |
| 3882 | writeString(0xa0, p2) |
| 3883 | } |
| 3884 | _sendLogPayload(0x1c, 0xc4); |
| 3885 | assembly ("memory-safe") { |
| 3886 | mstore(0x00, m0) |
| 3887 | mstore(0x20, m1) |
| 3888 | mstore(0x40, m2) |
| 3889 | mstore(0x60, m3) |
| 3890 | mstore(0x80, m4) |
| 3891 | mstore(0xa0, m5) |
| 3892 | mstore(0xc0, m6) |
| 3893 | } |
| 3894 | } |
| 3895 | |
| 3896 | function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure { |
| 3897 | bytes32 m0; |
| 3898 | bytes32 m1; |
| 3899 | bytes32 m2; |
| 3900 | bytes32 m3; |
| 3901 | bytes32 m4; |
| 3902 | bytes32 m5; |
| 3903 | bytes32 m6; |
| 3904 | bytes32 m7; |
| 3905 | bytes32 m8; |
| 3906 | assembly ("memory-safe") { |
| 3907 | function writeString(pos, w) { |
| 3908 | let length := 0 |
| 3909 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 3910 | mstore(pos, length) |
| 3911 | let shift := sub(256, shl(3, length)) |
| 3912 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 3913 | } |
| 3914 | m0 := mload(0x00) |
| 3915 | m1 := mload(0x20) |
| 3916 | m2 := mload(0x40) |
| 3917 | m3 := mload(0x60) |
| 3918 | m4 := mload(0x80) |
| 3919 | m5 := mload(0xa0) |
| 3920 | m6 := mload(0xc0) |
| 3921 | m7 := mload(0xe0) |
| 3922 | m8 := mload(0x100) |
| 3923 | // Selector of `log(address,bool,string,string)`. |
| 3924 | mstore(0x00, 0x475c5c33) |
| 3925 | mstore(0x20, p0) |
| 3926 | mstore(0x40, p1) |
| 3927 | mstore(0x60, 0x80) |
| 3928 | mstore(0x80, 0xc0) |
| 3929 | writeString(0xa0, p2) |
| 3930 | writeString(0xe0, p3) |
| 3931 | } |
| 3932 | _sendLogPayload(0x1c, 0x104); |
| 3933 | assembly ("memory-safe") { |
| 3934 | mstore(0x00, m0) |
| 3935 | mstore(0x20, m1) |
| 3936 | mstore(0x40, m2) |
| 3937 | mstore(0x60, m3) |
| 3938 | mstore(0x80, m4) |
| 3939 | mstore(0xa0, m5) |
| 3940 | mstore(0xc0, m6) |
| 3941 | mstore(0xe0, m7) |
| 3942 | mstore(0x100, m8) |
| 3943 | } |
| 3944 | } |
| 3945 | |
| 3946 | function log(address p0, uint256 p1, address p2, address p3) internal pure { |
| 3947 | bytes32 m0; |
| 3948 | bytes32 m1; |
| 3949 | bytes32 m2; |
| 3950 | bytes32 m3; |
| 3951 | bytes32 m4; |
| 3952 | assembly ("memory-safe") { |
| 3953 | m0 := mload(0x00) |
| 3954 | m1 := mload(0x20) |
| 3955 | m2 := mload(0x40) |
| 3956 | m3 := mload(0x60) |
| 3957 | m4 := mload(0x80) |
| 3958 | // Selector of `log(address,uint256,address,address)`. |
| 3959 | mstore(0x00, 0x478d1c62) |
| 3960 | mstore(0x20, p0) |
| 3961 | mstore(0x40, p1) |
| 3962 | mstore(0x60, p2) |
| 3963 | mstore(0x80, p3) |
| 3964 | } |
| 3965 | _sendLogPayload(0x1c, 0x84); |
| 3966 | assembly ("memory-safe") { |
| 3967 | mstore(0x00, m0) |
| 3968 | mstore(0x20, m1) |
| 3969 | mstore(0x40, m2) |
| 3970 | mstore(0x60, m3) |
| 3971 | mstore(0x80, m4) |
| 3972 | } |
| 3973 | } |
| 3974 | |
| 3975 | function log(address p0, uint256 p1, address p2, bool p3) internal pure { |
| 3976 | bytes32 m0; |
| 3977 | bytes32 m1; |
| 3978 | bytes32 m2; |
| 3979 | bytes32 m3; |
| 3980 | bytes32 m4; |
| 3981 | assembly ("memory-safe") { |
| 3982 | m0 := mload(0x00) |
| 3983 | m1 := mload(0x20) |
| 3984 | m2 := mload(0x40) |
| 3985 | m3 := mload(0x60) |
| 3986 | m4 := mload(0x80) |
| 3987 | // Selector of `log(address,uint256,address,bool)`. |
| 3988 | mstore(0x00, 0xa1bcc9b3) |
| 3989 | mstore(0x20, p0) |
| 3990 | mstore(0x40, p1) |
| 3991 | mstore(0x60, p2) |
| 3992 | mstore(0x80, p3) |
| 3993 | } |
| 3994 | _sendLogPayload(0x1c, 0x84); |
| 3995 | assembly ("memory-safe") { |
| 3996 | mstore(0x00, m0) |
| 3997 | mstore(0x20, m1) |
| 3998 | mstore(0x40, m2) |
| 3999 | mstore(0x60, m3) |
| 4000 | mstore(0x80, m4) |
| 4001 | } |
| 4002 | } |
| 4003 | |
| 4004 | function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 4005 | bytes32 m0; |
| 4006 | bytes32 m1; |
| 4007 | bytes32 m2; |
| 4008 | bytes32 m3; |
| 4009 | bytes32 m4; |
| 4010 | assembly ("memory-safe") { |
| 4011 | m0 := mload(0x00) |
| 4012 | m1 := mload(0x20) |
| 4013 | m2 := mload(0x40) |
| 4014 | m3 := mload(0x60) |
| 4015 | m4 := mload(0x80) |
| 4016 | // Selector of `log(address,uint256,address,uint256)`. |
| 4017 | mstore(0x00, 0x100f650e) |
| 4018 | mstore(0x20, p0) |
| 4019 | mstore(0x40, p1) |
| 4020 | mstore(0x60, p2) |
| 4021 | mstore(0x80, p3) |
| 4022 | } |
| 4023 | _sendLogPayload(0x1c, 0x84); |
| 4024 | assembly ("memory-safe") { |
| 4025 | mstore(0x00, m0) |
| 4026 | mstore(0x20, m1) |
| 4027 | mstore(0x40, m2) |
| 4028 | mstore(0x60, m3) |
| 4029 | mstore(0x80, m4) |
| 4030 | } |
| 4031 | } |
| 4032 | |
| 4033 | function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure { |
| 4034 | bytes32 m0; |
| 4035 | bytes32 m1; |
| 4036 | bytes32 m2; |
| 4037 | bytes32 m3; |
| 4038 | bytes32 m4; |
| 4039 | bytes32 m5; |
| 4040 | bytes32 m6; |
| 4041 | assembly ("memory-safe") { |
| 4042 | function writeString(pos, w) { |
| 4043 | let length := 0 |
| 4044 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4045 | mstore(pos, length) |
| 4046 | let shift := sub(256, shl(3, length)) |
| 4047 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4048 | } |
| 4049 | m0 := mload(0x00) |
| 4050 | m1 := mload(0x20) |
| 4051 | m2 := mload(0x40) |
| 4052 | m3 := mload(0x60) |
| 4053 | m4 := mload(0x80) |
| 4054 | m5 := mload(0xa0) |
| 4055 | m6 := mload(0xc0) |
| 4056 | // Selector of `log(address,uint256,address,string)`. |
| 4057 | mstore(0x00, 0x1da986ea) |
| 4058 | mstore(0x20, p0) |
| 4059 | mstore(0x40, p1) |
| 4060 | mstore(0x60, p2) |
| 4061 | mstore(0x80, 0x80) |
| 4062 | writeString(0xa0, p3) |
| 4063 | } |
| 4064 | _sendLogPayload(0x1c, 0xc4); |
| 4065 | assembly ("memory-safe") { |
| 4066 | mstore(0x00, m0) |
| 4067 | mstore(0x20, m1) |
| 4068 | mstore(0x40, m2) |
| 4069 | mstore(0x60, m3) |
| 4070 | mstore(0x80, m4) |
| 4071 | mstore(0xa0, m5) |
| 4072 | mstore(0xc0, m6) |
| 4073 | } |
| 4074 | } |
| 4075 | |
| 4076 | function log(address p0, uint256 p1, bool p2, address p3) internal pure { |
| 4077 | bytes32 m0; |
| 4078 | bytes32 m1; |
| 4079 | bytes32 m2; |
| 4080 | bytes32 m3; |
| 4081 | bytes32 m4; |
| 4082 | assembly ("memory-safe") { |
| 4083 | m0 := mload(0x00) |
| 4084 | m1 := mload(0x20) |
| 4085 | m2 := mload(0x40) |
| 4086 | m3 := mload(0x60) |
| 4087 | m4 := mload(0x80) |
| 4088 | // Selector of `log(address,uint256,bool,address)`. |
| 4089 | mstore(0x00, 0xa31bfdcc) |
| 4090 | mstore(0x20, p0) |
| 4091 | mstore(0x40, p1) |
| 4092 | mstore(0x60, p2) |
| 4093 | mstore(0x80, p3) |
| 4094 | } |
| 4095 | _sendLogPayload(0x1c, 0x84); |
| 4096 | assembly ("memory-safe") { |
| 4097 | mstore(0x00, m0) |
| 4098 | mstore(0x20, m1) |
| 4099 | mstore(0x40, m2) |
| 4100 | mstore(0x60, m3) |
| 4101 | mstore(0x80, m4) |
| 4102 | } |
| 4103 | } |
| 4104 | |
| 4105 | function log(address p0, uint256 p1, bool p2, bool p3) internal pure { |
| 4106 | bytes32 m0; |
| 4107 | bytes32 m1; |
| 4108 | bytes32 m2; |
| 4109 | bytes32 m3; |
| 4110 | bytes32 m4; |
| 4111 | assembly ("memory-safe") { |
| 4112 | m0 := mload(0x00) |
| 4113 | m1 := mload(0x20) |
| 4114 | m2 := mload(0x40) |
| 4115 | m3 := mload(0x60) |
| 4116 | m4 := mload(0x80) |
| 4117 | // Selector of `log(address,uint256,bool,bool)`. |
| 4118 | mstore(0x00, 0x3bf5e537) |
| 4119 | mstore(0x20, p0) |
| 4120 | mstore(0x40, p1) |
| 4121 | mstore(0x60, p2) |
| 4122 | mstore(0x80, p3) |
| 4123 | } |
| 4124 | _sendLogPayload(0x1c, 0x84); |
| 4125 | assembly ("memory-safe") { |
| 4126 | mstore(0x00, m0) |
| 4127 | mstore(0x20, m1) |
| 4128 | mstore(0x40, m2) |
| 4129 | mstore(0x60, m3) |
| 4130 | mstore(0x80, m4) |
| 4131 | } |
| 4132 | } |
| 4133 | |
| 4134 | function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 4135 | bytes32 m0; |
| 4136 | bytes32 m1; |
| 4137 | bytes32 m2; |
| 4138 | bytes32 m3; |
| 4139 | bytes32 m4; |
| 4140 | assembly ("memory-safe") { |
| 4141 | m0 := mload(0x00) |
| 4142 | m1 := mload(0x20) |
| 4143 | m2 := mload(0x40) |
| 4144 | m3 := mload(0x60) |
| 4145 | m4 := mload(0x80) |
| 4146 | // Selector of `log(address,uint256,bool,uint256)`. |
| 4147 | mstore(0x00, 0x22f6b999) |
| 4148 | mstore(0x20, p0) |
| 4149 | mstore(0x40, p1) |
| 4150 | mstore(0x60, p2) |
| 4151 | mstore(0x80, p3) |
| 4152 | } |
| 4153 | _sendLogPayload(0x1c, 0x84); |
| 4154 | assembly ("memory-safe") { |
| 4155 | mstore(0x00, m0) |
| 4156 | mstore(0x20, m1) |
| 4157 | mstore(0x40, m2) |
| 4158 | mstore(0x60, m3) |
| 4159 | mstore(0x80, m4) |
| 4160 | } |
| 4161 | } |
| 4162 | |
| 4163 | function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure { |
| 4164 | bytes32 m0; |
| 4165 | bytes32 m1; |
| 4166 | bytes32 m2; |
| 4167 | bytes32 m3; |
| 4168 | bytes32 m4; |
| 4169 | bytes32 m5; |
| 4170 | bytes32 m6; |
| 4171 | assembly ("memory-safe") { |
| 4172 | function writeString(pos, w) { |
| 4173 | let length := 0 |
| 4174 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4175 | mstore(pos, length) |
| 4176 | let shift := sub(256, shl(3, length)) |
| 4177 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4178 | } |
| 4179 | m0 := mload(0x00) |
| 4180 | m1 := mload(0x20) |
| 4181 | m2 := mload(0x40) |
| 4182 | m3 := mload(0x60) |
| 4183 | m4 := mload(0x80) |
| 4184 | m5 := mload(0xa0) |
| 4185 | m6 := mload(0xc0) |
| 4186 | // Selector of `log(address,uint256,bool,string)`. |
| 4187 | mstore(0x00, 0xc5ad85f9) |
| 4188 | mstore(0x20, p0) |
| 4189 | mstore(0x40, p1) |
| 4190 | mstore(0x60, p2) |
| 4191 | mstore(0x80, 0x80) |
| 4192 | writeString(0xa0, p3) |
| 4193 | } |
| 4194 | _sendLogPayload(0x1c, 0xc4); |
| 4195 | assembly ("memory-safe") { |
| 4196 | mstore(0x00, m0) |
| 4197 | mstore(0x20, m1) |
| 4198 | mstore(0x40, m2) |
| 4199 | mstore(0x60, m3) |
| 4200 | mstore(0x80, m4) |
| 4201 | mstore(0xa0, m5) |
| 4202 | mstore(0xc0, m6) |
| 4203 | } |
| 4204 | } |
| 4205 | |
| 4206 | function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 4207 | bytes32 m0; |
| 4208 | bytes32 m1; |
| 4209 | bytes32 m2; |
| 4210 | bytes32 m3; |
| 4211 | bytes32 m4; |
| 4212 | assembly ("memory-safe") { |
| 4213 | m0 := mload(0x00) |
| 4214 | m1 := mload(0x20) |
| 4215 | m2 := mload(0x40) |
| 4216 | m3 := mload(0x60) |
| 4217 | m4 := mload(0x80) |
| 4218 | // Selector of `log(address,uint256,uint256,address)`. |
| 4219 | mstore(0x00, 0x20e3984d) |
| 4220 | mstore(0x20, p0) |
| 4221 | mstore(0x40, p1) |
| 4222 | mstore(0x60, p2) |
| 4223 | mstore(0x80, p3) |
| 4224 | } |
| 4225 | _sendLogPayload(0x1c, 0x84); |
| 4226 | assembly ("memory-safe") { |
| 4227 | mstore(0x00, m0) |
| 4228 | mstore(0x20, m1) |
| 4229 | mstore(0x40, m2) |
| 4230 | mstore(0x60, m3) |
| 4231 | mstore(0x80, m4) |
| 4232 | } |
| 4233 | } |
| 4234 | |
| 4235 | function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 4236 | bytes32 m0; |
| 4237 | bytes32 m1; |
| 4238 | bytes32 m2; |
| 4239 | bytes32 m3; |
| 4240 | bytes32 m4; |
| 4241 | assembly ("memory-safe") { |
| 4242 | m0 := mload(0x00) |
| 4243 | m1 := mload(0x20) |
| 4244 | m2 := mload(0x40) |
| 4245 | m3 := mload(0x60) |
| 4246 | m4 := mload(0x80) |
| 4247 | // Selector of `log(address,uint256,uint256,bool)`. |
| 4248 | mstore(0x00, 0x66f1bc67) |
| 4249 | mstore(0x20, p0) |
| 4250 | mstore(0x40, p1) |
| 4251 | mstore(0x60, p2) |
| 4252 | mstore(0x80, p3) |
| 4253 | } |
| 4254 | _sendLogPayload(0x1c, 0x84); |
| 4255 | assembly ("memory-safe") { |
| 4256 | mstore(0x00, m0) |
| 4257 | mstore(0x20, m1) |
| 4258 | mstore(0x40, m2) |
| 4259 | mstore(0x60, m3) |
| 4260 | mstore(0x80, m4) |
| 4261 | } |
| 4262 | } |
| 4263 | |
| 4264 | function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 4265 | bytes32 m0; |
| 4266 | bytes32 m1; |
| 4267 | bytes32 m2; |
| 4268 | bytes32 m3; |
| 4269 | bytes32 m4; |
| 4270 | assembly ("memory-safe") { |
| 4271 | m0 := mload(0x00) |
| 4272 | m1 := mload(0x20) |
| 4273 | m2 := mload(0x40) |
| 4274 | m3 := mload(0x60) |
| 4275 | m4 := mload(0x80) |
| 4276 | // Selector of `log(address,uint256,uint256,uint256)`. |
| 4277 | mstore(0x00, 0x34f0e636) |
| 4278 | mstore(0x20, p0) |
| 4279 | mstore(0x40, p1) |
| 4280 | mstore(0x60, p2) |
| 4281 | mstore(0x80, p3) |
| 4282 | } |
| 4283 | _sendLogPayload(0x1c, 0x84); |
| 4284 | assembly ("memory-safe") { |
| 4285 | mstore(0x00, m0) |
| 4286 | mstore(0x20, m1) |
| 4287 | mstore(0x40, m2) |
| 4288 | mstore(0x60, m3) |
| 4289 | mstore(0x80, m4) |
| 4290 | } |
| 4291 | } |
| 4292 | |
| 4293 | function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { |
| 4294 | bytes32 m0; |
| 4295 | bytes32 m1; |
| 4296 | bytes32 m2; |
| 4297 | bytes32 m3; |
| 4298 | bytes32 m4; |
| 4299 | bytes32 m5; |
| 4300 | bytes32 m6; |
| 4301 | assembly ("memory-safe") { |
| 4302 | function writeString(pos, w) { |
| 4303 | let length := 0 |
| 4304 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4305 | mstore(pos, length) |
| 4306 | let shift := sub(256, shl(3, length)) |
| 4307 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4308 | } |
| 4309 | m0 := mload(0x00) |
| 4310 | m1 := mload(0x20) |
| 4311 | m2 := mload(0x40) |
| 4312 | m3 := mload(0x60) |
| 4313 | m4 := mload(0x80) |
| 4314 | m5 := mload(0xa0) |
| 4315 | m6 := mload(0xc0) |
| 4316 | // Selector of `log(address,uint256,uint256,string)`. |
| 4317 | mstore(0x00, 0x4a28c017) |
| 4318 | mstore(0x20, p0) |
| 4319 | mstore(0x40, p1) |
| 4320 | mstore(0x60, p2) |
| 4321 | mstore(0x80, 0x80) |
| 4322 | writeString(0xa0, p3) |
| 4323 | } |
| 4324 | _sendLogPayload(0x1c, 0xc4); |
| 4325 | assembly ("memory-safe") { |
| 4326 | mstore(0x00, m0) |
| 4327 | mstore(0x20, m1) |
| 4328 | mstore(0x40, m2) |
| 4329 | mstore(0x60, m3) |
| 4330 | mstore(0x80, m4) |
| 4331 | mstore(0xa0, m5) |
| 4332 | mstore(0xc0, m6) |
| 4333 | } |
| 4334 | } |
| 4335 | |
| 4336 | function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure { |
| 4337 | bytes32 m0; |
| 4338 | bytes32 m1; |
| 4339 | bytes32 m2; |
| 4340 | bytes32 m3; |
| 4341 | bytes32 m4; |
| 4342 | bytes32 m5; |
| 4343 | bytes32 m6; |
| 4344 | assembly ("memory-safe") { |
| 4345 | function writeString(pos, w) { |
| 4346 | let length := 0 |
| 4347 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4348 | mstore(pos, length) |
| 4349 | let shift := sub(256, shl(3, length)) |
| 4350 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4351 | } |
| 4352 | m0 := mload(0x00) |
| 4353 | m1 := mload(0x20) |
| 4354 | m2 := mload(0x40) |
| 4355 | m3 := mload(0x60) |
| 4356 | m4 := mload(0x80) |
| 4357 | m5 := mload(0xa0) |
| 4358 | m6 := mload(0xc0) |
| 4359 | // Selector of `log(address,uint256,string,address)`. |
| 4360 | mstore(0x00, 0x5c430d47) |
| 4361 | mstore(0x20, p0) |
| 4362 | mstore(0x40, p1) |
| 4363 | mstore(0x60, 0x80) |
| 4364 | mstore(0x80, p3) |
| 4365 | writeString(0xa0, p2) |
| 4366 | } |
| 4367 | _sendLogPayload(0x1c, 0xc4); |
| 4368 | assembly ("memory-safe") { |
| 4369 | mstore(0x00, m0) |
| 4370 | mstore(0x20, m1) |
| 4371 | mstore(0x40, m2) |
| 4372 | mstore(0x60, m3) |
| 4373 | mstore(0x80, m4) |
| 4374 | mstore(0xa0, m5) |
| 4375 | mstore(0xc0, m6) |
| 4376 | } |
| 4377 | } |
| 4378 | |
| 4379 | function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure { |
| 4380 | bytes32 m0; |
| 4381 | bytes32 m1; |
| 4382 | bytes32 m2; |
| 4383 | bytes32 m3; |
| 4384 | bytes32 m4; |
| 4385 | bytes32 m5; |
| 4386 | bytes32 m6; |
| 4387 | assembly ("memory-safe") { |
| 4388 | function writeString(pos, w) { |
| 4389 | let length := 0 |
| 4390 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4391 | mstore(pos, length) |
| 4392 | let shift := sub(256, shl(3, length)) |
| 4393 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4394 | } |
| 4395 | m0 := mload(0x00) |
| 4396 | m1 := mload(0x20) |
| 4397 | m2 := mload(0x40) |
| 4398 | m3 := mload(0x60) |
| 4399 | m4 := mload(0x80) |
| 4400 | m5 := mload(0xa0) |
| 4401 | m6 := mload(0xc0) |
| 4402 | // Selector of `log(address,uint256,string,bool)`. |
| 4403 | mstore(0x00, 0xcf18105c) |
| 4404 | mstore(0x20, p0) |
| 4405 | mstore(0x40, p1) |
| 4406 | mstore(0x60, 0x80) |
| 4407 | mstore(0x80, p3) |
| 4408 | writeString(0xa0, p2) |
| 4409 | } |
| 4410 | _sendLogPayload(0x1c, 0xc4); |
| 4411 | assembly ("memory-safe") { |
| 4412 | mstore(0x00, m0) |
| 4413 | mstore(0x20, m1) |
| 4414 | mstore(0x40, m2) |
| 4415 | mstore(0x60, m3) |
| 4416 | mstore(0x80, m4) |
| 4417 | mstore(0xa0, m5) |
| 4418 | mstore(0xc0, m6) |
| 4419 | } |
| 4420 | } |
| 4421 | |
| 4422 | function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { |
| 4423 | bytes32 m0; |
| 4424 | bytes32 m1; |
| 4425 | bytes32 m2; |
| 4426 | bytes32 m3; |
| 4427 | bytes32 m4; |
| 4428 | bytes32 m5; |
| 4429 | bytes32 m6; |
| 4430 | assembly ("memory-safe") { |
| 4431 | function writeString(pos, w) { |
| 4432 | let length := 0 |
| 4433 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4434 | mstore(pos, length) |
| 4435 | let shift := sub(256, shl(3, length)) |
| 4436 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4437 | } |
| 4438 | m0 := mload(0x00) |
| 4439 | m1 := mload(0x20) |
| 4440 | m2 := mload(0x40) |
| 4441 | m3 := mload(0x60) |
| 4442 | m4 := mload(0x80) |
| 4443 | m5 := mload(0xa0) |
| 4444 | m6 := mload(0xc0) |
| 4445 | // Selector of `log(address,uint256,string,uint256)`. |
| 4446 | mstore(0x00, 0xbf01f891) |
| 4447 | mstore(0x20, p0) |
| 4448 | mstore(0x40, p1) |
| 4449 | mstore(0x60, 0x80) |
| 4450 | mstore(0x80, p3) |
| 4451 | writeString(0xa0, p2) |
| 4452 | } |
| 4453 | _sendLogPayload(0x1c, 0xc4); |
| 4454 | assembly ("memory-safe") { |
| 4455 | mstore(0x00, m0) |
| 4456 | mstore(0x20, m1) |
| 4457 | mstore(0x40, m2) |
| 4458 | mstore(0x60, m3) |
| 4459 | mstore(0x80, m4) |
| 4460 | mstore(0xa0, m5) |
| 4461 | mstore(0xc0, m6) |
| 4462 | } |
| 4463 | } |
| 4464 | |
| 4465 | function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { |
| 4466 | bytes32 m0; |
| 4467 | bytes32 m1; |
| 4468 | bytes32 m2; |
| 4469 | bytes32 m3; |
| 4470 | bytes32 m4; |
| 4471 | bytes32 m5; |
| 4472 | bytes32 m6; |
| 4473 | bytes32 m7; |
| 4474 | bytes32 m8; |
| 4475 | assembly ("memory-safe") { |
| 4476 | function writeString(pos, w) { |
| 4477 | let length := 0 |
| 4478 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4479 | mstore(pos, length) |
| 4480 | let shift := sub(256, shl(3, length)) |
| 4481 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4482 | } |
| 4483 | m0 := mload(0x00) |
| 4484 | m1 := mload(0x20) |
| 4485 | m2 := mload(0x40) |
| 4486 | m3 := mload(0x60) |
| 4487 | m4 := mload(0x80) |
| 4488 | m5 := mload(0xa0) |
| 4489 | m6 := mload(0xc0) |
| 4490 | m7 := mload(0xe0) |
| 4491 | m8 := mload(0x100) |
| 4492 | // Selector of `log(address,uint256,string,string)`. |
| 4493 | mstore(0x00, 0x88a8c406) |
| 4494 | mstore(0x20, p0) |
| 4495 | mstore(0x40, p1) |
| 4496 | mstore(0x60, 0x80) |
| 4497 | mstore(0x80, 0xc0) |
| 4498 | writeString(0xa0, p2) |
| 4499 | writeString(0xe0, p3) |
| 4500 | } |
| 4501 | _sendLogPayload(0x1c, 0x104); |
| 4502 | assembly ("memory-safe") { |
| 4503 | mstore(0x00, m0) |
| 4504 | mstore(0x20, m1) |
| 4505 | mstore(0x40, m2) |
| 4506 | mstore(0x60, m3) |
| 4507 | mstore(0x80, m4) |
| 4508 | mstore(0xa0, m5) |
| 4509 | mstore(0xc0, m6) |
| 4510 | mstore(0xe0, m7) |
| 4511 | mstore(0x100, m8) |
| 4512 | } |
| 4513 | } |
| 4514 | |
| 4515 | function log(address p0, bytes32 p1, address p2, address p3) internal pure { |
| 4516 | bytes32 m0; |
| 4517 | bytes32 m1; |
| 4518 | bytes32 m2; |
| 4519 | bytes32 m3; |
| 4520 | bytes32 m4; |
| 4521 | bytes32 m5; |
| 4522 | bytes32 m6; |
| 4523 | assembly ("memory-safe") { |
| 4524 | function writeString(pos, w) { |
| 4525 | let length := 0 |
| 4526 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4527 | mstore(pos, length) |
| 4528 | let shift := sub(256, shl(3, length)) |
| 4529 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4530 | } |
| 4531 | m0 := mload(0x00) |
| 4532 | m1 := mload(0x20) |
| 4533 | m2 := mload(0x40) |
| 4534 | m3 := mload(0x60) |
| 4535 | m4 := mload(0x80) |
| 4536 | m5 := mload(0xa0) |
| 4537 | m6 := mload(0xc0) |
| 4538 | // Selector of `log(address,string,address,address)`. |
| 4539 | mstore(0x00, 0x0d36fa20) |
| 4540 | mstore(0x20, p0) |
| 4541 | mstore(0x40, 0x80) |
| 4542 | mstore(0x60, p2) |
| 4543 | mstore(0x80, p3) |
| 4544 | writeString(0xa0, p1) |
| 4545 | } |
| 4546 | _sendLogPayload(0x1c, 0xc4); |
| 4547 | assembly ("memory-safe") { |
| 4548 | mstore(0x00, m0) |
| 4549 | mstore(0x20, m1) |
| 4550 | mstore(0x40, m2) |
| 4551 | mstore(0x60, m3) |
| 4552 | mstore(0x80, m4) |
| 4553 | mstore(0xa0, m5) |
| 4554 | mstore(0xc0, m6) |
| 4555 | } |
| 4556 | } |
| 4557 | |
| 4558 | function log(address p0, bytes32 p1, address p2, bool p3) internal pure { |
| 4559 | bytes32 m0; |
| 4560 | bytes32 m1; |
| 4561 | bytes32 m2; |
| 4562 | bytes32 m3; |
| 4563 | bytes32 m4; |
| 4564 | bytes32 m5; |
| 4565 | bytes32 m6; |
| 4566 | assembly ("memory-safe") { |
| 4567 | function writeString(pos, w) { |
| 4568 | let length := 0 |
| 4569 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4570 | mstore(pos, length) |
| 4571 | let shift := sub(256, shl(3, length)) |
| 4572 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4573 | } |
| 4574 | m0 := mload(0x00) |
| 4575 | m1 := mload(0x20) |
| 4576 | m2 := mload(0x40) |
| 4577 | m3 := mload(0x60) |
| 4578 | m4 := mload(0x80) |
| 4579 | m5 := mload(0xa0) |
| 4580 | m6 := mload(0xc0) |
| 4581 | // Selector of `log(address,string,address,bool)`. |
| 4582 | mstore(0x00, 0x0df12b76) |
| 4583 | mstore(0x20, p0) |
| 4584 | mstore(0x40, 0x80) |
| 4585 | mstore(0x60, p2) |
| 4586 | mstore(0x80, p3) |
| 4587 | writeString(0xa0, p1) |
| 4588 | } |
| 4589 | _sendLogPayload(0x1c, 0xc4); |
| 4590 | assembly ("memory-safe") { |
| 4591 | mstore(0x00, m0) |
| 4592 | mstore(0x20, m1) |
| 4593 | mstore(0x40, m2) |
| 4594 | mstore(0x60, m3) |
| 4595 | mstore(0x80, m4) |
| 4596 | mstore(0xa0, m5) |
| 4597 | mstore(0xc0, m6) |
| 4598 | } |
| 4599 | } |
| 4600 | |
| 4601 | function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure { |
| 4602 | bytes32 m0; |
| 4603 | bytes32 m1; |
| 4604 | bytes32 m2; |
| 4605 | bytes32 m3; |
| 4606 | bytes32 m4; |
| 4607 | bytes32 m5; |
| 4608 | bytes32 m6; |
| 4609 | assembly ("memory-safe") { |
| 4610 | function writeString(pos, w) { |
| 4611 | let length := 0 |
| 4612 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4613 | mstore(pos, length) |
| 4614 | let shift := sub(256, shl(3, length)) |
| 4615 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4616 | } |
| 4617 | m0 := mload(0x00) |
| 4618 | m1 := mload(0x20) |
| 4619 | m2 := mload(0x40) |
| 4620 | m3 := mload(0x60) |
| 4621 | m4 := mload(0x80) |
| 4622 | m5 := mload(0xa0) |
| 4623 | m6 := mload(0xc0) |
| 4624 | // Selector of `log(address,string,address,uint256)`. |
| 4625 | mstore(0x00, 0x457fe3cf) |
| 4626 | mstore(0x20, p0) |
| 4627 | mstore(0x40, 0x80) |
| 4628 | mstore(0x60, p2) |
| 4629 | mstore(0x80, p3) |
| 4630 | writeString(0xa0, p1) |
| 4631 | } |
| 4632 | _sendLogPayload(0x1c, 0xc4); |
| 4633 | assembly ("memory-safe") { |
| 4634 | mstore(0x00, m0) |
| 4635 | mstore(0x20, m1) |
| 4636 | mstore(0x40, m2) |
| 4637 | mstore(0x60, m3) |
| 4638 | mstore(0x80, m4) |
| 4639 | mstore(0xa0, m5) |
| 4640 | mstore(0xc0, m6) |
| 4641 | } |
| 4642 | } |
| 4643 | |
| 4644 | function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure { |
| 4645 | bytes32 m0; |
| 4646 | bytes32 m1; |
| 4647 | bytes32 m2; |
| 4648 | bytes32 m3; |
| 4649 | bytes32 m4; |
| 4650 | bytes32 m5; |
| 4651 | bytes32 m6; |
| 4652 | bytes32 m7; |
| 4653 | bytes32 m8; |
| 4654 | assembly ("memory-safe") { |
| 4655 | function writeString(pos, w) { |
| 4656 | let length := 0 |
| 4657 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4658 | mstore(pos, length) |
| 4659 | let shift := sub(256, shl(3, length)) |
| 4660 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4661 | } |
| 4662 | m0 := mload(0x00) |
| 4663 | m1 := mload(0x20) |
| 4664 | m2 := mload(0x40) |
| 4665 | m3 := mload(0x60) |
| 4666 | m4 := mload(0x80) |
| 4667 | m5 := mload(0xa0) |
| 4668 | m6 := mload(0xc0) |
| 4669 | m7 := mload(0xe0) |
| 4670 | m8 := mload(0x100) |
| 4671 | // Selector of `log(address,string,address,string)`. |
| 4672 | mstore(0x00, 0xf7e36245) |
| 4673 | mstore(0x20, p0) |
| 4674 | mstore(0x40, 0x80) |
| 4675 | mstore(0x60, p2) |
| 4676 | mstore(0x80, 0xc0) |
| 4677 | writeString(0xa0, p1) |
| 4678 | writeString(0xe0, p3) |
| 4679 | } |
| 4680 | _sendLogPayload(0x1c, 0x104); |
| 4681 | assembly ("memory-safe") { |
| 4682 | mstore(0x00, m0) |
| 4683 | mstore(0x20, m1) |
| 4684 | mstore(0x40, m2) |
| 4685 | mstore(0x60, m3) |
| 4686 | mstore(0x80, m4) |
| 4687 | mstore(0xa0, m5) |
| 4688 | mstore(0xc0, m6) |
| 4689 | mstore(0xe0, m7) |
| 4690 | mstore(0x100, m8) |
| 4691 | } |
| 4692 | } |
| 4693 | |
| 4694 | function log(address p0, bytes32 p1, bool p2, address p3) internal pure { |
| 4695 | bytes32 m0; |
| 4696 | bytes32 m1; |
| 4697 | bytes32 m2; |
| 4698 | bytes32 m3; |
| 4699 | bytes32 m4; |
| 4700 | bytes32 m5; |
| 4701 | bytes32 m6; |
| 4702 | assembly ("memory-safe") { |
| 4703 | function writeString(pos, w) { |
| 4704 | let length := 0 |
| 4705 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4706 | mstore(pos, length) |
| 4707 | let shift := sub(256, shl(3, length)) |
| 4708 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4709 | } |
| 4710 | m0 := mload(0x00) |
| 4711 | m1 := mload(0x20) |
| 4712 | m2 := mload(0x40) |
| 4713 | m3 := mload(0x60) |
| 4714 | m4 := mload(0x80) |
| 4715 | m5 := mload(0xa0) |
| 4716 | m6 := mload(0xc0) |
| 4717 | // Selector of `log(address,string,bool,address)`. |
| 4718 | mstore(0x00, 0x205871c2) |
| 4719 | mstore(0x20, p0) |
| 4720 | mstore(0x40, 0x80) |
| 4721 | mstore(0x60, p2) |
| 4722 | mstore(0x80, p3) |
| 4723 | writeString(0xa0, p1) |
| 4724 | } |
| 4725 | _sendLogPayload(0x1c, 0xc4); |
| 4726 | assembly ("memory-safe") { |
| 4727 | mstore(0x00, m0) |
| 4728 | mstore(0x20, m1) |
| 4729 | mstore(0x40, m2) |
| 4730 | mstore(0x60, m3) |
| 4731 | mstore(0x80, m4) |
| 4732 | mstore(0xa0, m5) |
| 4733 | mstore(0xc0, m6) |
| 4734 | } |
| 4735 | } |
| 4736 | |
| 4737 | function log(address p0, bytes32 p1, bool p2, bool p3) internal pure { |
| 4738 | bytes32 m0; |
| 4739 | bytes32 m1; |
| 4740 | bytes32 m2; |
| 4741 | bytes32 m3; |
| 4742 | bytes32 m4; |
| 4743 | bytes32 m5; |
| 4744 | bytes32 m6; |
| 4745 | assembly ("memory-safe") { |
| 4746 | function writeString(pos, w) { |
| 4747 | let length := 0 |
| 4748 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4749 | mstore(pos, length) |
| 4750 | let shift := sub(256, shl(3, length)) |
| 4751 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4752 | } |
| 4753 | m0 := mload(0x00) |
| 4754 | m1 := mload(0x20) |
| 4755 | m2 := mload(0x40) |
| 4756 | m3 := mload(0x60) |
| 4757 | m4 := mload(0x80) |
| 4758 | m5 := mload(0xa0) |
| 4759 | m6 := mload(0xc0) |
| 4760 | // Selector of `log(address,string,bool,bool)`. |
| 4761 | mstore(0x00, 0x5f1d5c9f) |
| 4762 | mstore(0x20, p0) |
| 4763 | mstore(0x40, 0x80) |
| 4764 | mstore(0x60, p2) |
| 4765 | mstore(0x80, p3) |
| 4766 | writeString(0xa0, p1) |
| 4767 | } |
| 4768 | _sendLogPayload(0x1c, 0xc4); |
| 4769 | assembly ("memory-safe") { |
| 4770 | mstore(0x00, m0) |
| 4771 | mstore(0x20, m1) |
| 4772 | mstore(0x40, m2) |
| 4773 | mstore(0x60, m3) |
| 4774 | mstore(0x80, m4) |
| 4775 | mstore(0xa0, m5) |
| 4776 | mstore(0xc0, m6) |
| 4777 | } |
| 4778 | } |
| 4779 | |
| 4780 | function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure { |
| 4781 | bytes32 m0; |
| 4782 | bytes32 m1; |
| 4783 | bytes32 m2; |
| 4784 | bytes32 m3; |
| 4785 | bytes32 m4; |
| 4786 | bytes32 m5; |
| 4787 | bytes32 m6; |
| 4788 | assembly ("memory-safe") { |
| 4789 | function writeString(pos, w) { |
| 4790 | let length := 0 |
| 4791 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4792 | mstore(pos, length) |
| 4793 | let shift := sub(256, shl(3, length)) |
| 4794 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4795 | } |
| 4796 | m0 := mload(0x00) |
| 4797 | m1 := mload(0x20) |
| 4798 | m2 := mload(0x40) |
| 4799 | m3 := mload(0x60) |
| 4800 | m4 := mload(0x80) |
| 4801 | m5 := mload(0xa0) |
| 4802 | m6 := mload(0xc0) |
| 4803 | // Selector of `log(address,string,bool,uint256)`. |
| 4804 | mstore(0x00, 0x515e38b6) |
| 4805 | mstore(0x20, p0) |
| 4806 | mstore(0x40, 0x80) |
| 4807 | mstore(0x60, p2) |
| 4808 | mstore(0x80, p3) |
| 4809 | writeString(0xa0, p1) |
| 4810 | } |
| 4811 | _sendLogPayload(0x1c, 0xc4); |
| 4812 | assembly ("memory-safe") { |
| 4813 | mstore(0x00, m0) |
| 4814 | mstore(0x20, m1) |
| 4815 | mstore(0x40, m2) |
| 4816 | mstore(0x60, m3) |
| 4817 | mstore(0x80, m4) |
| 4818 | mstore(0xa0, m5) |
| 4819 | mstore(0xc0, m6) |
| 4820 | } |
| 4821 | } |
| 4822 | |
| 4823 | function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure { |
| 4824 | bytes32 m0; |
| 4825 | bytes32 m1; |
| 4826 | bytes32 m2; |
| 4827 | bytes32 m3; |
| 4828 | bytes32 m4; |
| 4829 | bytes32 m5; |
| 4830 | bytes32 m6; |
| 4831 | bytes32 m7; |
| 4832 | bytes32 m8; |
| 4833 | assembly ("memory-safe") { |
| 4834 | function writeString(pos, w) { |
| 4835 | let length := 0 |
| 4836 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4837 | mstore(pos, length) |
| 4838 | let shift := sub(256, shl(3, length)) |
| 4839 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4840 | } |
| 4841 | m0 := mload(0x00) |
| 4842 | m1 := mload(0x20) |
| 4843 | m2 := mload(0x40) |
| 4844 | m3 := mload(0x60) |
| 4845 | m4 := mload(0x80) |
| 4846 | m5 := mload(0xa0) |
| 4847 | m6 := mload(0xc0) |
| 4848 | m7 := mload(0xe0) |
| 4849 | m8 := mload(0x100) |
| 4850 | // Selector of `log(address,string,bool,string)`. |
| 4851 | mstore(0x00, 0xbc0b61fe) |
| 4852 | mstore(0x20, p0) |
| 4853 | mstore(0x40, 0x80) |
| 4854 | mstore(0x60, p2) |
| 4855 | mstore(0x80, 0xc0) |
| 4856 | writeString(0xa0, p1) |
| 4857 | writeString(0xe0, p3) |
| 4858 | } |
| 4859 | _sendLogPayload(0x1c, 0x104); |
| 4860 | assembly ("memory-safe") { |
| 4861 | mstore(0x00, m0) |
| 4862 | mstore(0x20, m1) |
| 4863 | mstore(0x40, m2) |
| 4864 | mstore(0x60, m3) |
| 4865 | mstore(0x80, m4) |
| 4866 | mstore(0xa0, m5) |
| 4867 | mstore(0xc0, m6) |
| 4868 | mstore(0xe0, m7) |
| 4869 | mstore(0x100, m8) |
| 4870 | } |
| 4871 | } |
| 4872 | |
| 4873 | function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure { |
| 4874 | bytes32 m0; |
| 4875 | bytes32 m1; |
| 4876 | bytes32 m2; |
| 4877 | bytes32 m3; |
| 4878 | bytes32 m4; |
| 4879 | bytes32 m5; |
| 4880 | bytes32 m6; |
| 4881 | assembly ("memory-safe") { |
| 4882 | function writeString(pos, w) { |
| 4883 | let length := 0 |
| 4884 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4885 | mstore(pos, length) |
| 4886 | let shift := sub(256, shl(3, length)) |
| 4887 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4888 | } |
| 4889 | m0 := mload(0x00) |
| 4890 | m1 := mload(0x20) |
| 4891 | m2 := mload(0x40) |
| 4892 | m3 := mload(0x60) |
| 4893 | m4 := mload(0x80) |
| 4894 | m5 := mload(0xa0) |
| 4895 | m6 := mload(0xc0) |
| 4896 | // Selector of `log(address,string,uint256,address)`. |
| 4897 | mstore(0x00, 0x63183678) |
| 4898 | mstore(0x20, p0) |
| 4899 | mstore(0x40, 0x80) |
| 4900 | mstore(0x60, p2) |
| 4901 | mstore(0x80, p3) |
| 4902 | writeString(0xa0, p1) |
| 4903 | } |
| 4904 | _sendLogPayload(0x1c, 0xc4); |
| 4905 | assembly ("memory-safe") { |
| 4906 | mstore(0x00, m0) |
| 4907 | mstore(0x20, m1) |
| 4908 | mstore(0x40, m2) |
| 4909 | mstore(0x60, m3) |
| 4910 | mstore(0x80, m4) |
| 4911 | mstore(0xa0, m5) |
| 4912 | mstore(0xc0, m6) |
| 4913 | } |
| 4914 | } |
| 4915 | |
| 4916 | function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure { |
| 4917 | bytes32 m0; |
| 4918 | bytes32 m1; |
| 4919 | bytes32 m2; |
| 4920 | bytes32 m3; |
| 4921 | bytes32 m4; |
| 4922 | bytes32 m5; |
| 4923 | bytes32 m6; |
| 4924 | assembly ("memory-safe") { |
| 4925 | function writeString(pos, w) { |
| 4926 | let length := 0 |
| 4927 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4928 | mstore(pos, length) |
| 4929 | let shift := sub(256, shl(3, length)) |
| 4930 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4931 | } |
| 4932 | m0 := mload(0x00) |
| 4933 | m1 := mload(0x20) |
| 4934 | m2 := mload(0x40) |
| 4935 | m3 := mload(0x60) |
| 4936 | m4 := mload(0x80) |
| 4937 | m5 := mload(0xa0) |
| 4938 | m6 := mload(0xc0) |
| 4939 | // Selector of `log(address,string,uint256,bool)`. |
| 4940 | mstore(0x00, 0x0ef7e050) |
| 4941 | mstore(0x20, p0) |
| 4942 | mstore(0x40, 0x80) |
| 4943 | mstore(0x60, p2) |
| 4944 | mstore(0x80, p3) |
| 4945 | writeString(0xa0, p1) |
| 4946 | } |
| 4947 | _sendLogPayload(0x1c, 0xc4); |
| 4948 | assembly ("memory-safe") { |
| 4949 | mstore(0x00, m0) |
| 4950 | mstore(0x20, m1) |
| 4951 | mstore(0x40, m2) |
| 4952 | mstore(0x60, m3) |
| 4953 | mstore(0x80, m4) |
| 4954 | mstore(0xa0, m5) |
| 4955 | mstore(0xc0, m6) |
| 4956 | } |
| 4957 | } |
| 4958 | |
| 4959 | function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { |
| 4960 | bytes32 m0; |
| 4961 | bytes32 m1; |
| 4962 | bytes32 m2; |
| 4963 | bytes32 m3; |
| 4964 | bytes32 m4; |
| 4965 | bytes32 m5; |
| 4966 | bytes32 m6; |
| 4967 | assembly ("memory-safe") { |
| 4968 | function writeString(pos, w) { |
| 4969 | let length := 0 |
| 4970 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 4971 | mstore(pos, length) |
| 4972 | let shift := sub(256, shl(3, length)) |
| 4973 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 4974 | } |
| 4975 | m0 := mload(0x00) |
| 4976 | m1 := mload(0x20) |
| 4977 | m2 := mload(0x40) |
| 4978 | m3 := mload(0x60) |
| 4979 | m4 := mload(0x80) |
| 4980 | m5 := mload(0xa0) |
| 4981 | m6 := mload(0xc0) |
| 4982 | // Selector of `log(address,string,uint256,uint256)`. |
| 4983 | mstore(0x00, 0x1dc8e1b8) |
| 4984 | mstore(0x20, p0) |
| 4985 | mstore(0x40, 0x80) |
| 4986 | mstore(0x60, p2) |
| 4987 | mstore(0x80, p3) |
| 4988 | writeString(0xa0, p1) |
| 4989 | } |
| 4990 | _sendLogPayload(0x1c, 0xc4); |
| 4991 | assembly ("memory-safe") { |
| 4992 | mstore(0x00, m0) |
| 4993 | mstore(0x20, m1) |
| 4994 | mstore(0x40, m2) |
| 4995 | mstore(0x60, m3) |
| 4996 | mstore(0x80, m4) |
| 4997 | mstore(0xa0, m5) |
| 4998 | mstore(0xc0, m6) |
| 4999 | } |
| 5000 | } |
| 5001 | |
| 5002 | function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { |
| 5003 | bytes32 m0; |
| 5004 | bytes32 m1; |
| 5005 | bytes32 m2; |
| 5006 | bytes32 m3; |
| 5007 | bytes32 m4; |
| 5008 | bytes32 m5; |
| 5009 | bytes32 m6; |
| 5010 | bytes32 m7; |
| 5011 | bytes32 m8; |
| 5012 | assembly ("memory-safe") { |
| 5013 | function writeString(pos, w) { |
| 5014 | let length := 0 |
| 5015 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5016 | mstore(pos, length) |
| 5017 | let shift := sub(256, shl(3, length)) |
| 5018 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5019 | } |
| 5020 | m0 := mload(0x00) |
| 5021 | m1 := mload(0x20) |
| 5022 | m2 := mload(0x40) |
| 5023 | m3 := mload(0x60) |
| 5024 | m4 := mload(0x80) |
| 5025 | m5 := mload(0xa0) |
| 5026 | m6 := mload(0xc0) |
| 5027 | m7 := mload(0xe0) |
| 5028 | m8 := mload(0x100) |
| 5029 | // Selector of `log(address,string,uint256,string)`. |
| 5030 | mstore(0x00, 0x448830a8) |
| 5031 | mstore(0x20, p0) |
| 5032 | mstore(0x40, 0x80) |
| 5033 | mstore(0x60, p2) |
| 5034 | mstore(0x80, 0xc0) |
| 5035 | writeString(0xa0, p1) |
| 5036 | writeString(0xe0, p3) |
| 5037 | } |
| 5038 | _sendLogPayload(0x1c, 0x104); |
| 5039 | assembly ("memory-safe") { |
| 5040 | mstore(0x00, m0) |
| 5041 | mstore(0x20, m1) |
| 5042 | mstore(0x40, m2) |
| 5043 | mstore(0x60, m3) |
| 5044 | mstore(0x80, m4) |
| 5045 | mstore(0xa0, m5) |
| 5046 | mstore(0xc0, m6) |
| 5047 | mstore(0xe0, m7) |
| 5048 | mstore(0x100, m8) |
| 5049 | } |
| 5050 | } |
| 5051 | |
| 5052 | function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure { |
| 5053 | bytes32 m0; |
| 5054 | bytes32 m1; |
| 5055 | bytes32 m2; |
| 5056 | bytes32 m3; |
| 5057 | bytes32 m4; |
| 5058 | bytes32 m5; |
| 5059 | bytes32 m6; |
| 5060 | bytes32 m7; |
| 5061 | bytes32 m8; |
| 5062 | assembly ("memory-safe") { |
| 5063 | function writeString(pos, w) { |
| 5064 | let length := 0 |
| 5065 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5066 | mstore(pos, length) |
| 5067 | let shift := sub(256, shl(3, length)) |
| 5068 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5069 | } |
| 5070 | m0 := mload(0x00) |
| 5071 | m1 := mload(0x20) |
| 5072 | m2 := mload(0x40) |
| 5073 | m3 := mload(0x60) |
| 5074 | m4 := mload(0x80) |
| 5075 | m5 := mload(0xa0) |
| 5076 | m6 := mload(0xc0) |
| 5077 | m7 := mload(0xe0) |
| 5078 | m8 := mload(0x100) |
| 5079 | // Selector of `log(address,string,string,address)`. |
| 5080 | mstore(0x00, 0xa04e2f87) |
| 5081 | mstore(0x20, p0) |
| 5082 | mstore(0x40, 0x80) |
| 5083 | mstore(0x60, 0xc0) |
| 5084 | mstore(0x80, p3) |
| 5085 | writeString(0xa0, p1) |
| 5086 | writeString(0xe0, p2) |
| 5087 | } |
| 5088 | _sendLogPayload(0x1c, 0x104); |
| 5089 | assembly ("memory-safe") { |
| 5090 | mstore(0x00, m0) |
| 5091 | mstore(0x20, m1) |
| 5092 | mstore(0x40, m2) |
| 5093 | mstore(0x60, m3) |
| 5094 | mstore(0x80, m4) |
| 5095 | mstore(0xa0, m5) |
| 5096 | mstore(0xc0, m6) |
| 5097 | mstore(0xe0, m7) |
| 5098 | mstore(0x100, m8) |
| 5099 | } |
| 5100 | } |
| 5101 | |
| 5102 | function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure { |
| 5103 | bytes32 m0; |
| 5104 | bytes32 m1; |
| 5105 | bytes32 m2; |
| 5106 | bytes32 m3; |
| 5107 | bytes32 m4; |
| 5108 | bytes32 m5; |
| 5109 | bytes32 m6; |
| 5110 | bytes32 m7; |
| 5111 | bytes32 m8; |
| 5112 | assembly ("memory-safe") { |
| 5113 | function writeString(pos, w) { |
| 5114 | let length := 0 |
| 5115 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5116 | mstore(pos, length) |
| 5117 | let shift := sub(256, shl(3, length)) |
| 5118 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5119 | } |
| 5120 | m0 := mload(0x00) |
| 5121 | m1 := mload(0x20) |
| 5122 | m2 := mload(0x40) |
| 5123 | m3 := mload(0x60) |
| 5124 | m4 := mload(0x80) |
| 5125 | m5 := mload(0xa0) |
| 5126 | m6 := mload(0xc0) |
| 5127 | m7 := mload(0xe0) |
| 5128 | m8 := mload(0x100) |
| 5129 | // Selector of `log(address,string,string,bool)`. |
| 5130 | mstore(0x00, 0x35a5071f) |
| 5131 | mstore(0x20, p0) |
| 5132 | mstore(0x40, 0x80) |
| 5133 | mstore(0x60, 0xc0) |
| 5134 | mstore(0x80, p3) |
| 5135 | writeString(0xa0, p1) |
| 5136 | writeString(0xe0, p2) |
| 5137 | } |
| 5138 | _sendLogPayload(0x1c, 0x104); |
| 5139 | assembly ("memory-safe") { |
| 5140 | mstore(0x00, m0) |
| 5141 | mstore(0x20, m1) |
| 5142 | mstore(0x40, m2) |
| 5143 | mstore(0x60, m3) |
| 5144 | mstore(0x80, m4) |
| 5145 | mstore(0xa0, m5) |
| 5146 | mstore(0xc0, m6) |
| 5147 | mstore(0xe0, m7) |
| 5148 | mstore(0x100, m8) |
| 5149 | } |
| 5150 | } |
| 5151 | |
| 5152 | function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { |
| 5153 | bytes32 m0; |
| 5154 | bytes32 m1; |
| 5155 | bytes32 m2; |
| 5156 | bytes32 m3; |
| 5157 | bytes32 m4; |
| 5158 | bytes32 m5; |
| 5159 | bytes32 m6; |
| 5160 | bytes32 m7; |
| 5161 | bytes32 m8; |
| 5162 | assembly ("memory-safe") { |
| 5163 | function writeString(pos, w) { |
| 5164 | let length := 0 |
| 5165 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5166 | mstore(pos, length) |
| 5167 | let shift := sub(256, shl(3, length)) |
| 5168 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5169 | } |
| 5170 | m0 := mload(0x00) |
| 5171 | m1 := mload(0x20) |
| 5172 | m2 := mload(0x40) |
| 5173 | m3 := mload(0x60) |
| 5174 | m4 := mload(0x80) |
| 5175 | m5 := mload(0xa0) |
| 5176 | m6 := mload(0xc0) |
| 5177 | m7 := mload(0xe0) |
| 5178 | m8 := mload(0x100) |
| 5179 | // Selector of `log(address,string,string,uint256)`. |
| 5180 | mstore(0x00, 0x159f8927) |
| 5181 | mstore(0x20, p0) |
| 5182 | mstore(0x40, 0x80) |
| 5183 | mstore(0x60, 0xc0) |
| 5184 | mstore(0x80, p3) |
| 5185 | writeString(0xa0, p1) |
| 5186 | writeString(0xe0, p2) |
| 5187 | } |
| 5188 | _sendLogPayload(0x1c, 0x104); |
| 5189 | assembly ("memory-safe") { |
| 5190 | mstore(0x00, m0) |
| 5191 | mstore(0x20, m1) |
| 5192 | mstore(0x40, m2) |
| 5193 | mstore(0x60, m3) |
| 5194 | mstore(0x80, m4) |
| 5195 | mstore(0xa0, m5) |
| 5196 | mstore(0xc0, m6) |
| 5197 | mstore(0xe0, m7) |
| 5198 | mstore(0x100, m8) |
| 5199 | } |
| 5200 | } |
| 5201 | |
| 5202 | function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { |
| 5203 | bytes32 m0; |
| 5204 | bytes32 m1; |
| 5205 | bytes32 m2; |
| 5206 | bytes32 m3; |
| 5207 | bytes32 m4; |
| 5208 | bytes32 m5; |
| 5209 | bytes32 m6; |
| 5210 | bytes32 m7; |
| 5211 | bytes32 m8; |
| 5212 | bytes32 m9; |
| 5213 | bytes32 m10; |
| 5214 | assembly ("memory-safe") { |
| 5215 | function writeString(pos, w) { |
| 5216 | let length := 0 |
| 5217 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5218 | mstore(pos, length) |
| 5219 | let shift := sub(256, shl(3, length)) |
| 5220 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5221 | } |
| 5222 | m0 := mload(0x00) |
| 5223 | m1 := mload(0x20) |
| 5224 | m2 := mload(0x40) |
| 5225 | m3 := mload(0x60) |
| 5226 | m4 := mload(0x80) |
| 5227 | m5 := mload(0xa0) |
| 5228 | m6 := mload(0xc0) |
| 5229 | m7 := mload(0xe0) |
| 5230 | m8 := mload(0x100) |
| 5231 | m9 := mload(0x120) |
| 5232 | m10 := mload(0x140) |
| 5233 | // Selector of `log(address,string,string,string)`. |
| 5234 | mstore(0x00, 0x5d02c50b) |
| 5235 | mstore(0x20, p0) |
| 5236 | mstore(0x40, 0x80) |
| 5237 | mstore(0x60, 0xc0) |
| 5238 | mstore(0x80, 0x100) |
| 5239 | writeString(0xa0, p1) |
| 5240 | writeString(0xe0, p2) |
| 5241 | writeString(0x120, p3) |
| 5242 | } |
| 5243 | _sendLogPayload(0x1c, 0x144); |
| 5244 | assembly ("memory-safe") { |
| 5245 | mstore(0x00, m0) |
| 5246 | mstore(0x20, m1) |
| 5247 | mstore(0x40, m2) |
| 5248 | mstore(0x60, m3) |
| 5249 | mstore(0x80, m4) |
| 5250 | mstore(0xa0, m5) |
| 5251 | mstore(0xc0, m6) |
| 5252 | mstore(0xe0, m7) |
| 5253 | mstore(0x100, m8) |
| 5254 | mstore(0x120, m9) |
| 5255 | mstore(0x140, m10) |
| 5256 | } |
| 5257 | } |
| 5258 | |
| 5259 | function log(bool p0, address p1, address p2, address p3) internal pure { |
| 5260 | bytes32 m0; |
| 5261 | bytes32 m1; |
| 5262 | bytes32 m2; |
| 5263 | bytes32 m3; |
| 5264 | bytes32 m4; |
| 5265 | assembly ("memory-safe") { |
| 5266 | m0 := mload(0x00) |
| 5267 | m1 := mload(0x20) |
| 5268 | m2 := mload(0x40) |
| 5269 | m3 := mload(0x60) |
| 5270 | m4 := mload(0x80) |
| 5271 | // Selector of `log(bool,address,address,address)`. |
| 5272 | mstore(0x00, 0x1d14d001) |
| 5273 | mstore(0x20, p0) |
| 5274 | mstore(0x40, p1) |
| 5275 | mstore(0x60, p2) |
| 5276 | mstore(0x80, p3) |
| 5277 | } |
| 5278 | _sendLogPayload(0x1c, 0x84); |
| 5279 | assembly ("memory-safe") { |
| 5280 | mstore(0x00, m0) |
| 5281 | mstore(0x20, m1) |
| 5282 | mstore(0x40, m2) |
| 5283 | mstore(0x60, m3) |
| 5284 | mstore(0x80, m4) |
| 5285 | } |
| 5286 | } |
| 5287 | |
| 5288 | function log(bool p0, address p1, address p2, bool p3) internal pure { |
| 5289 | bytes32 m0; |
| 5290 | bytes32 m1; |
| 5291 | bytes32 m2; |
| 5292 | bytes32 m3; |
| 5293 | bytes32 m4; |
| 5294 | assembly ("memory-safe") { |
| 5295 | m0 := mload(0x00) |
| 5296 | m1 := mload(0x20) |
| 5297 | m2 := mload(0x40) |
| 5298 | m3 := mload(0x60) |
| 5299 | m4 := mload(0x80) |
| 5300 | // Selector of `log(bool,address,address,bool)`. |
| 5301 | mstore(0x00, 0x46600be0) |
| 5302 | mstore(0x20, p0) |
| 5303 | mstore(0x40, p1) |
| 5304 | mstore(0x60, p2) |
| 5305 | mstore(0x80, p3) |
| 5306 | } |
| 5307 | _sendLogPayload(0x1c, 0x84); |
| 5308 | assembly ("memory-safe") { |
| 5309 | mstore(0x00, m0) |
| 5310 | mstore(0x20, m1) |
| 5311 | mstore(0x40, m2) |
| 5312 | mstore(0x60, m3) |
| 5313 | mstore(0x80, m4) |
| 5314 | } |
| 5315 | } |
| 5316 | |
| 5317 | function log(bool p0, address p1, address p2, uint256 p3) internal pure { |
| 5318 | bytes32 m0; |
| 5319 | bytes32 m1; |
| 5320 | bytes32 m2; |
| 5321 | bytes32 m3; |
| 5322 | bytes32 m4; |
| 5323 | assembly ("memory-safe") { |
| 5324 | m0 := mload(0x00) |
| 5325 | m1 := mload(0x20) |
| 5326 | m2 := mload(0x40) |
| 5327 | m3 := mload(0x60) |
| 5328 | m4 := mload(0x80) |
| 5329 | // Selector of `log(bool,address,address,uint256)`. |
| 5330 | mstore(0x00, 0x0c66d1be) |
| 5331 | mstore(0x20, p0) |
| 5332 | mstore(0x40, p1) |
| 5333 | mstore(0x60, p2) |
| 5334 | mstore(0x80, p3) |
| 5335 | } |
| 5336 | _sendLogPayload(0x1c, 0x84); |
| 5337 | assembly ("memory-safe") { |
| 5338 | mstore(0x00, m0) |
| 5339 | mstore(0x20, m1) |
| 5340 | mstore(0x40, m2) |
| 5341 | mstore(0x60, m3) |
| 5342 | mstore(0x80, m4) |
| 5343 | } |
| 5344 | } |
| 5345 | |
| 5346 | function log(bool p0, address p1, address p2, bytes32 p3) internal pure { |
| 5347 | bytes32 m0; |
| 5348 | bytes32 m1; |
| 5349 | bytes32 m2; |
| 5350 | bytes32 m3; |
| 5351 | bytes32 m4; |
| 5352 | bytes32 m5; |
| 5353 | bytes32 m6; |
| 5354 | assembly ("memory-safe") { |
| 5355 | function writeString(pos, w) { |
| 5356 | let length := 0 |
| 5357 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5358 | mstore(pos, length) |
| 5359 | let shift := sub(256, shl(3, length)) |
| 5360 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5361 | } |
| 5362 | m0 := mload(0x00) |
| 5363 | m1 := mload(0x20) |
| 5364 | m2 := mload(0x40) |
| 5365 | m3 := mload(0x60) |
| 5366 | m4 := mload(0x80) |
| 5367 | m5 := mload(0xa0) |
| 5368 | m6 := mload(0xc0) |
| 5369 | // Selector of `log(bool,address,address,string)`. |
| 5370 | mstore(0x00, 0xd812a167) |
| 5371 | mstore(0x20, p0) |
| 5372 | mstore(0x40, p1) |
| 5373 | mstore(0x60, p2) |
| 5374 | mstore(0x80, 0x80) |
| 5375 | writeString(0xa0, p3) |
| 5376 | } |
| 5377 | _sendLogPayload(0x1c, 0xc4); |
| 5378 | assembly ("memory-safe") { |
| 5379 | mstore(0x00, m0) |
| 5380 | mstore(0x20, m1) |
| 5381 | mstore(0x40, m2) |
| 5382 | mstore(0x60, m3) |
| 5383 | mstore(0x80, m4) |
| 5384 | mstore(0xa0, m5) |
| 5385 | mstore(0xc0, m6) |
| 5386 | } |
| 5387 | } |
| 5388 | |
| 5389 | function log(bool p0, address p1, bool p2, address p3) internal pure { |
| 5390 | bytes32 m0; |
| 5391 | bytes32 m1; |
| 5392 | bytes32 m2; |
| 5393 | bytes32 m3; |
| 5394 | bytes32 m4; |
| 5395 | assembly ("memory-safe") { |
| 5396 | m0 := mload(0x00) |
| 5397 | m1 := mload(0x20) |
| 5398 | m2 := mload(0x40) |
| 5399 | m3 := mload(0x60) |
| 5400 | m4 := mload(0x80) |
| 5401 | // Selector of `log(bool,address,bool,address)`. |
| 5402 | mstore(0x00, 0x1c41a336) |
| 5403 | mstore(0x20, p0) |
| 5404 | mstore(0x40, p1) |
| 5405 | mstore(0x60, p2) |
| 5406 | mstore(0x80, p3) |
| 5407 | } |
| 5408 | _sendLogPayload(0x1c, 0x84); |
| 5409 | assembly ("memory-safe") { |
| 5410 | mstore(0x00, m0) |
| 5411 | mstore(0x20, m1) |
| 5412 | mstore(0x40, m2) |
| 5413 | mstore(0x60, m3) |
| 5414 | mstore(0x80, m4) |
| 5415 | } |
| 5416 | } |
| 5417 | |
| 5418 | function log(bool p0, address p1, bool p2, bool p3) internal pure { |
| 5419 | bytes32 m0; |
| 5420 | bytes32 m1; |
| 5421 | bytes32 m2; |
| 5422 | bytes32 m3; |
| 5423 | bytes32 m4; |
| 5424 | assembly ("memory-safe") { |
| 5425 | m0 := mload(0x00) |
| 5426 | m1 := mload(0x20) |
| 5427 | m2 := mload(0x40) |
| 5428 | m3 := mload(0x60) |
| 5429 | m4 := mload(0x80) |
| 5430 | // Selector of `log(bool,address,bool,bool)`. |
| 5431 | mstore(0x00, 0x6a9c478b) |
| 5432 | mstore(0x20, p0) |
| 5433 | mstore(0x40, p1) |
| 5434 | mstore(0x60, p2) |
| 5435 | mstore(0x80, p3) |
| 5436 | } |
| 5437 | _sendLogPayload(0x1c, 0x84); |
| 5438 | assembly ("memory-safe") { |
| 5439 | mstore(0x00, m0) |
| 5440 | mstore(0x20, m1) |
| 5441 | mstore(0x40, m2) |
| 5442 | mstore(0x60, m3) |
| 5443 | mstore(0x80, m4) |
| 5444 | } |
| 5445 | } |
| 5446 | |
| 5447 | function log(bool p0, address p1, bool p2, uint256 p3) internal pure { |
| 5448 | bytes32 m0; |
| 5449 | bytes32 m1; |
| 5450 | bytes32 m2; |
| 5451 | bytes32 m3; |
| 5452 | bytes32 m4; |
| 5453 | assembly ("memory-safe") { |
| 5454 | m0 := mload(0x00) |
| 5455 | m1 := mload(0x20) |
| 5456 | m2 := mload(0x40) |
| 5457 | m3 := mload(0x60) |
| 5458 | m4 := mload(0x80) |
| 5459 | // Selector of `log(bool,address,bool,uint256)`. |
| 5460 | mstore(0x00, 0x07831502) |
| 5461 | mstore(0x20, p0) |
| 5462 | mstore(0x40, p1) |
| 5463 | mstore(0x60, p2) |
| 5464 | mstore(0x80, p3) |
| 5465 | } |
| 5466 | _sendLogPayload(0x1c, 0x84); |
| 5467 | assembly ("memory-safe") { |
| 5468 | mstore(0x00, m0) |
| 5469 | mstore(0x20, m1) |
| 5470 | mstore(0x40, m2) |
| 5471 | mstore(0x60, m3) |
| 5472 | mstore(0x80, m4) |
| 5473 | } |
| 5474 | } |
| 5475 | |
| 5476 | function log(bool p0, address p1, bool p2, bytes32 p3) internal pure { |
| 5477 | bytes32 m0; |
| 5478 | bytes32 m1; |
| 5479 | bytes32 m2; |
| 5480 | bytes32 m3; |
| 5481 | bytes32 m4; |
| 5482 | bytes32 m5; |
| 5483 | bytes32 m6; |
| 5484 | assembly ("memory-safe") { |
| 5485 | function writeString(pos, w) { |
| 5486 | let length := 0 |
| 5487 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5488 | mstore(pos, length) |
| 5489 | let shift := sub(256, shl(3, length)) |
| 5490 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5491 | } |
| 5492 | m0 := mload(0x00) |
| 5493 | m1 := mload(0x20) |
| 5494 | m2 := mload(0x40) |
| 5495 | m3 := mload(0x60) |
| 5496 | m4 := mload(0x80) |
| 5497 | m5 := mload(0xa0) |
| 5498 | m6 := mload(0xc0) |
| 5499 | // Selector of `log(bool,address,bool,string)`. |
| 5500 | mstore(0x00, 0x4a66cb34) |
| 5501 | mstore(0x20, p0) |
| 5502 | mstore(0x40, p1) |
| 5503 | mstore(0x60, p2) |
| 5504 | mstore(0x80, 0x80) |
| 5505 | writeString(0xa0, p3) |
| 5506 | } |
| 5507 | _sendLogPayload(0x1c, 0xc4); |
| 5508 | assembly ("memory-safe") { |
| 5509 | mstore(0x00, m0) |
| 5510 | mstore(0x20, m1) |
| 5511 | mstore(0x40, m2) |
| 5512 | mstore(0x60, m3) |
| 5513 | mstore(0x80, m4) |
| 5514 | mstore(0xa0, m5) |
| 5515 | mstore(0xc0, m6) |
| 5516 | } |
| 5517 | } |
| 5518 | |
| 5519 | function log(bool p0, address p1, uint256 p2, address p3) internal pure { |
| 5520 | bytes32 m0; |
| 5521 | bytes32 m1; |
| 5522 | bytes32 m2; |
| 5523 | bytes32 m3; |
| 5524 | bytes32 m4; |
| 5525 | assembly ("memory-safe") { |
| 5526 | m0 := mload(0x00) |
| 5527 | m1 := mload(0x20) |
| 5528 | m2 := mload(0x40) |
| 5529 | m3 := mload(0x60) |
| 5530 | m4 := mload(0x80) |
| 5531 | // Selector of `log(bool,address,uint256,address)`. |
| 5532 | mstore(0x00, 0x136b05dd) |
| 5533 | mstore(0x20, p0) |
| 5534 | mstore(0x40, p1) |
| 5535 | mstore(0x60, p2) |
| 5536 | mstore(0x80, p3) |
| 5537 | } |
| 5538 | _sendLogPayload(0x1c, 0x84); |
| 5539 | assembly ("memory-safe") { |
| 5540 | mstore(0x00, m0) |
| 5541 | mstore(0x20, m1) |
| 5542 | mstore(0x40, m2) |
| 5543 | mstore(0x60, m3) |
| 5544 | mstore(0x80, m4) |
| 5545 | } |
| 5546 | } |
| 5547 | |
| 5548 | function log(bool p0, address p1, uint256 p2, bool p3) internal pure { |
| 5549 | bytes32 m0; |
| 5550 | bytes32 m1; |
| 5551 | bytes32 m2; |
| 5552 | bytes32 m3; |
| 5553 | bytes32 m4; |
| 5554 | assembly ("memory-safe") { |
| 5555 | m0 := mload(0x00) |
| 5556 | m1 := mload(0x20) |
| 5557 | m2 := mload(0x40) |
| 5558 | m3 := mload(0x60) |
| 5559 | m4 := mload(0x80) |
| 5560 | // Selector of `log(bool,address,uint256,bool)`. |
| 5561 | mstore(0x00, 0xd6019f1c) |
| 5562 | mstore(0x20, p0) |
| 5563 | mstore(0x40, p1) |
| 5564 | mstore(0x60, p2) |
| 5565 | mstore(0x80, p3) |
| 5566 | } |
| 5567 | _sendLogPayload(0x1c, 0x84); |
| 5568 | assembly ("memory-safe") { |
| 5569 | mstore(0x00, m0) |
| 5570 | mstore(0x20, m1) |
| 5571 | mstore(0x40, m2) |
| 5572 | mstore(0x60, m3) |
| 5573 | mstore(0x80, m4) |
| 5574 | } |
| 5575 | } |
| 5576 | |
| 5577 | function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 5578 | bytes32 m0; |
| 5579 | bytes32 m1; |
| 5580 | bytes32 m2; |
| 5581 | bytes32 m3; |
| 5582 | bytes32 m4; |
| 5583 | assembly ("memory-safe") { |
| 5584 | m0 := mload(0x00) |
| 5585 | m1 := mload(0x20) |
| 5586 | m2 := mload(0x40) |
| 5587 | m3 := mload(0x60) |
| 5588 | m4 := mload(0x80) |
| 5589 | // Selector of `log(bool,address,uint256,uint256)`. |
| 5590 | mstore(0x00, 0x7bf181a1) |
| 5591 | mstore(0x20, p0) |
| 5592 | mstore(0x40, p1) |
| 5593 | mstore(0x60, p2) |
| 5594 | mstore(0x80, p3) |
| 5595 | } |
| 5596 | _sendLogPayload(0x1c, 0x84); |
| 5597 | assembly ("memory-safe") { |
| 5598 | mstore(0x00, m0) |
| 5599 | mstore(0x20, m1) |
| 5600 | mstore(0x40, m2) |
| 5601 | mstore(0x60, m3) |
| 5602 | mstore(0x80, m4) |
| 5603 | } |
| 5604 | } |
| 5605 | |
| 5606 | function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure { |
| 5607 | bytes32 m0; |
| 5608 | bytes32 m1; |
| 5609 | bytes32 m2; |
| 5610 | bytes32 m3; |
| 5611 | bytes32 m4; |
| 5612 | bytes32 m5; |
| 5613 | bytes32 m6; |
| 5614 | assembly ("memory-safe") { |
| 5615 | function writeString(pos, w) { |
| 5616 | let length := 0 |
| 5617 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5618 | mstore(pos, length) |
| 5619 | let shift := sub(256, shl(3, length)) |
| 5620 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5621 | } |
| 5622 | m0 := mload(0x00) |
| 5623 | m1 := mload(0x20) |
| 5624 | m2 := mload(0x40) |
| 5625 | m3 := mload(0x60) |
| 5626 | m4 := mload(0x80) |
| 5627 | m5 := mload(0xa0) |
| 5628 | m6 := mload(0xc0) |
| 5629 | // Selector of `log(bool,address,uint256,string)`. |
| 5630 | mstore(0x00, 0x51f09ff8) |
| 5631 | mstore(0x20, p0) |
| 5632 | mstore(0x40, p1) |
| 5633 | mstore(0x60, p2) |
| 5634 | mstore(0x80, 0x80) |
| 5635 | writeString(0xa0, p3) |
| 5636 | } |
| 5637 | _sendLogPayload(0x1c, 0xc4); |
| 5638 | assembly ("memory-safe") { |
| 5639 | mstore(0x00, m0) |
| 5640 | mstore(0x20, m1) |
| 5641 | mstore(0x40, m2) |
| 5642 | mstore(0x60, m3) |
| 5643 | mstore(0x80, m4) |
| 5644 | mstore(0xa0, m5) |
| 5645 | mstore(0xc0, m6) |
| 5646 | } |
| 5647 | } |
| 5648 | |
| 5649 | function log(bool p0, address p1, bytes32 p2, address p3) internal pure { |
| 5650 | bytes32 m0; |
| 5651 | bytes32 m1; |
| 5652 | bytes32 m2; |
| 5653 | bytes32 m3; |
| 5654 | bytes32 m4; |
| 5655 | bytes32 m5; |
| 5656 | bytes32 m6; |
| 5657 | assembly ("memory-safe") { |
| 5658 | function writeString(pos, w) { |
| 5659 | let length := 0 |
| 5660 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5661 | mstore(pos, length) |
| 5662 | let shift := sub(256, shl(3, length)) |
| 5663 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5664 | } |
| 5665 | m0 := mload(0x00) |
| 5666 | m1 := mload(0x20) |
| 5667 | m2 := mload(0x40) |
| 5668 | m3 := mload(0x60) |
| 5669 | m4 := mload(0x80) |
| 5670 | m5 := mload(0xa0) |
| 5671 | m6 := mload(0xc0) |
| 5672 | // Selector of `log(bool,address,string,address)`. |
| 5673 | mstore(0x00, 0x6f7c603e) |
| 5674 | mstore(0x20, p0) |
| 5675 | mstore(0x40, p1) |
| 5676 | mstore(0x60, 0x80) |
| 5677 | mstore(0x80, p3) |
| 5678 | writeString(0xa0, p2) |
| 5679 | } |
| 5680 | _sendLogPayload(0x1c, 0xc4); |
| 5681 | assembly ("memory-safe") { |
| 5682 | mstore(0x00, m0) |
| 5683 | mstore(0x20, m1) |
| 5684 | mstore(0x40, m2) |
| 5685 | mstore(0x60, m3) |
| 5686 | mstore(0x80, m4) |
| 5687 | mstore(0xa0, m5) |
| 5688 | mstore(0xc0, m6) |
| 5689 | } |
| 5690 | } |
| 5691 | |
| 5692 | function log(bool p0, address p1, bytes32 p2, bool p3) internal pure { |
| 5693 | bytes32 m0; |
| 5694 | bytes32 m1; |
| 5695 | bytes32 m2; |
| 5696 | bytes32 m3; |
| 5697 | bytes32 m4; |
| 5698 | bytes32 m5; |
| 5699 | bytes32 m6; |
| 5700 | assembly ("memory-safe") { |
| 5701 | function writeString(pos, w) { |
| 5702 | let length := 0 |
| 5703 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5704 | mstore(pos, length) |
| 5705 | let shift := sub(256, shl(3, length)) |
| 5706 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5707 | } |
| 5708 | m0 := mload(0x00) |
| 5709 | m1 := mload(0x20) |
| 5710 | m2 := mload(0x40) |
| 5711 | m3 := mload(0x60) |
| 5712 | m4 := mload(0x80) |
| 5713 | m5 := mload(0xa0) |
| 5714 | m6 := mload(0xc0) |
| 5715 | // Selector of `log(bool,address,string,bool)`. |
| 5716 | mstore(0x00, 0xe2bfd60b) |
| 5717 | mstore(0x20, p0) |
| 5718 | mstore(0x40, p1) |
| 5719 | mstore(0x60, 0x80) |
| 5720 | mstore(0x80, p3) |
| 5721 | writeString(0xa0, p2) |
| 5722 | } |
| 5723 | _sendLogPayload(0x1c, 0xc4); |
| 5724 | assembly ("memory-safe") { |
| 5725 | mstore(0x00, m0) |
| 5726 | mstore(0x20, m1) |
| 5727 | mstore(0x40, m2) |
| 5728 | mstore(0x60, m3) |
| 5729 | mstore(0x80, m4) |
| 5730 | mstore(0xa0, m5) |
| 5731 | mstore(0xc0, m6) |
| 5732 | } |
| 5733 | } |
| 5734 | |
| 5735 | function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure { |
| 5736 | bytes32 m0; |
| 5737 | bytes32 m1; |
| 5738 | bytes32 m2; |
| 5739 | bytes32 m3; |
| 5740 | bytes32 m4; |
| 5741 | bytes32 m5; |
| 5742 | bytes32 m6; |
| 5743 | assembly ("memory-safe") { |
| 5744 | function writeString(pos, w) { |
| 5745 | let length := 0 |
| 5746 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5747 | mstore(pos, length) |
| 5748 | let shift := sub(256, shl(3, length)) |
| 5749 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5750 | } |
| 5751 | m0 := mload(0x00) |
| 5752 | m1 := mload(0x20) |
| 5753 | m2 := mload(0x40) |
| 5754 | m3 := mload(0x60) |
| 5755 | m4 := mload(0x80) |
| 5756 | m5 := mload(0xa0) |
| 5757 | m6 := mload(0xc0) |
| 5758 | // Selector of `log(bool,address,string,uint256)`. |
| 5759 | mstore(0x00, 0xc21f64c7) |
| 5760 | mstore(0x20, p0) |
| 5761 | mstore(0x40, p1) |
| 5762 | mstore(0x60, 0x80) |
| 5763 | mstore(0x80, p3) |
| 5764 | writeString(0xa0, p2) |
| 5765 | } |
| 5766 | _sendLogPayload(0x1c, 0xc4); |
| 5767 | assembly ("memory-safe") { |
| 5768 | mstore(0x00, m0) |
| 5769 | mstore(0x20, m1) |
| 5770 | mstore(0x40, m2) |
| 5771 | mstore(0x60, m3) |
| 5772 | mstore(0x80, m4) |
| 5773 | mstore(0xa0, m5) |
| 5774 | mstore(0xc0, m6) |
| 5775 | } |
| 5776 | } |
| 5777 | |
| 5778 | function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure { |
| 5779 | bytes32 m0; |
| 5780 | bytes32 m1; |
| 5781 | bytes32 m2; |
| 5782 | bytes32 m3; |
| 5783 | bytes32 m4; |
| 5784 | bytes32 m5; |
| 5785 | bytes32 m6; |
| 5786 | bytes32 m7; |
| 5787 | bytes32 m8; |
| 5788 | assembly ("memory-safe") { |
| 5789 | function writeString(pos, w) { |
| 5790 | let length := 0 |
| 5791 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5792 | mstore(pos, length) |
| 5793 | let shift := sub(256, shl(3, length)) |
| 5794 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5795 | } |
| 5796 | m0 := mload(0x00) |
| 5797 | m1 := mload(0x20) |
| 5798 | m2 := mload(0x40) |
| 5799 | m3 := mload(0x60) |
| 5800 | m4 := mload(0x80) |
| 5801 | m5 := mload(0xa0) |
| 5802 | m6 := mload(0xc0) |
| 5803 | m7 := mload(0xe0) |
| 5804 | m8 := mload(0x100) |
| 5805 | // Selector of `log(bool,address,string,string)`. |
| 5806 | mstore(0x00, 0xa73c1db6) |
| 5807 | mstore(0x20, p0) |
| 5808 | mstore(0x40, p1) |
| 5809 | mstore(0x60, 0x80) |
| 5810 | mstore(0x80, 0xc0) |
| 5811 | writeString(0xa0, p2) |
| 5812 | writeString(0xe0, p3) |
| 5813 | } |
| 5814 | _sendLogPayload(0x1c, 0x104); |
| 5815 | assembly ("memory-safe") { |
| 5816 | mstore(0x00, m0) |
| 5817 | mstore(0x20, m1) |
| 5818 | mstore(0x40, m2) |
| 5819 | mstore(0x60, m3) |
| 5820 | mstore(0x80, m4) |
| 5821 | mstore(0xa0, m5) |
| 5822 | mstore(0xc0, m6) |
| 5823 | mstore(0xe0, m7) |
| 5824 | mstore(0x100, m8) |
| 5825 | } |
| 5826 | } |
| 5827 | |
| 5828 | function log(bool p0, bool p1, address p2, address p3) internal pure { |
| 5829 | bytes32 m0; |
| 5830 | bytes32 m1; |
| 5831 | bytes32 m2; |
| 5832 | bytes32 m3; |
| 5833 | bytes32 m4; |
| 5834 | assembly ("memory-safe") { |
| 5835 | m0 := mload(0x00) |
| 5836 | m1 := mload(0x20) |
| 5837 | m2 := mload(0x40) |
| 5838 | m3 := mload(0x60) |
| 5839 | m4 := mload(0x80) |
| 5840 | // Selector of `log(bool,bool,address,address)`. |
| 5841 | mstore(0x00, 0xf4880ea4) |
| 5842 | mstore(0x20, p0) |
| 5843 | mstore(0x40, p1) |
| 5844 | mstore(0x60, p2) |
| 5845 | mstore(0x80, p3) |
| 5846 | } |
| 5847 | _sendLogPayload(0x1c, 0x84); |
| 5848 | assembly ("memory-safe") { |
| 5849 | mstore(0x00, m0) |
| 5850 | mstore(0x20, m1) |
| 5851 | mstore(0x40, m2) |
| 5852 | mstore(0x60, m3) |
| 5853 | mstore(0x80, m4) |
| 5854 | } |
| 5855 | } |
| 5856 | |
| 5857 | function log(bool p0, bool p1, address p2, bool p3) internal pure { |
| 5858 | bytes32 m0; |
| 5859 | bytes32 m1; |
| 5860 | bytes32 m2; |
| 5861 | bytes32 m3; |
| 5862 | bytes32 m4; |
| 5863 | assembly ("memory-safe") { |
| 5864 | m0 := mload(0x00) |
| 5865 | m1 := mload(0x20) |
| 5866 | m2 := mload(0x40) |
| 5867 | m3 := mload(0x60) |
| 5868 | m4 := mload(0x80) |
| 5869 | // Selector of `log(bool,bool,address,bool)`. |
| 5870 | mstore(0x00, 0xc0a302d8) |
| 5871 | mstore(0x20, p0) |
| 5872 | mstore(0x40, p1) |
| 5873 | mstore(0x60, p2) |
| 5874 | mstore(0x80, p3) |
| 5875 | } |
| 5876 | _sendLogPayload(0x1c, 0x84); |
| 5877 | assembly ("memory-safe") { |
| 5878 | mstore(0x00, m0) |
| 5879 | mstore(0x20, m1) |
| 5880 | mstore(0x40, m2) |
| 5881 | mstore(0x60, m3) |
| 5882 | mstore(0x80, m4) |
| 5883 | } |
| 5884 | } |
| 5885 | |
| 5886 | function log(bool p0, bool p1, address p2, uint256 p3) internal pure { |
| 5887 | bytes32 m0; |
| 5888 | bytes32 m1; |
| 5889 | bytes32 m2; |
| 5890 | bytes32 m3; |
| 5891 | bytes32 m4; |
| 5892 | assembly ("memory-safe") { |
| 5893 | m0 := mload(0x00) |
| 5894 | m1 := mload(0x20) |
| 5895 | m2 := mload(0x40) |
| 5896 | m3 := mload(0x60) |
| 5897 | m4 := mload(0x80) |
| 5898 | // Selector of `log(bool,bool,address,uint256)`. |
| 5899 | mstore(0x00, 0x4c123d57) |
| 5900 | mstore(0x20, p0) |
| 5901 | mstore(0x40, p1) |
| 5902 | mstore(0x60, p2) |
| 5903 | mstore(0x80, p3) |
| 5904 | } |
| 5905 | _sendLogPayload(0x1c, 0x84); |
| 5906 | assembly ("memory-safe") { |
| 5907 | mstore(0x00, m0) |
| 5908 | mstore(0x20, m1) |
| 5909 | mstore(0x40, m2) |
| 5910 | mstore(0x60, m3) |
| 5911 | mstore(0x80, m4) |
| 5912 | } |
| 5913 | } |
| 5914 | |
| 5915 | function log(bool p0, bool p1, address p2, bytes32 p3) internal pure { |
| 5916 | bytes32 m0; |
| 5917 | bytes32 m1; |
| 5918 | bytes32 m2; |
| 5919 | bytes32 m3; |
| 5920 | bytes32 m4; |
| 5921 | bytes32 m5; |
| 5922 | bytes32 m6; |
| 5923 | assembly ("memory-safe") { |
| 5924 | function writeString(pos, w) { |
| 5925 | let length := 0 |
| 5926 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 5927 | mstore(pos, length) |
| 5928 | let shift := sub(256, shl(3, length)) |
| 5929 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 5930 | } |
| 5931 | m0 := mload(0x00) |
| 5932 | m1 := mload(0x20) |
| 5933 | m2 := mload(0x40) |
| 5934 | m3 := mload(0x60) |
| 5935 | m4 := mload(0x80) |
| 5936 | m5 := mload(0xa0) |
| 5937 | m6 := mload(0xc0) |
| 5938 | // Selector of `log(bool,bool,address,string)`. |
| 5939 | mstore(0x00, 0xa0a47963) |
| 5940 | mstore(0x20, p0) |
| 5941 | mstore(0x40, p1) |
| 5942 | mstore(0x60, p2) |
| 5943 | mstore(0x80, 0x80) |
| 5944 | writeString(0xa0, p3) |
| 5945 | } |
| 5946 | _sendLogPayload(0x1c, 0xc4); |
| 5947 | assembly ("memory-safe") { |
| 5948 | mstore(0x00, m0) |
| 5949 | mstore(0x20, m1) |
| 5950 | mstore(0x40, m2) |
| 5951 | mstore(0x60, m3) |
| 5952 | mstore(0x80, m4) |
| 5953 | mstore(0xa0, m5) |
| 5954 | mstore(0xc0, m6) |
| 5955 | } |
| 5956 | } |
| 5957 | |
| 5958 | function log(bool p0, bool p1, bool p2, address p3) internal pure { |
| 5959 | bytes32 m0; |
| 5960 | bytes32 m1; |
| 5961 | bytes32 m2; |
| 5962 | bytes32 m3; |
| 5963 | bytes32 m4; |
| 5964 | assembly ("memory-safe") { |
| 5965 | m0 := mload(0x00) |
| 5966 | m1 := mload(0x20) |
| 5967 | m2 := mload(0x40) |
| 5968 | m3 := mload(0x60) |
| 5969 | m4 := mload(0x80) |
| 5970 | // Selector of `log(bool,bool,bool,address)`. |
| 5971 | mstore(0x00, 0x8c329b1a) |
| 5972 | mstore(0x20, p0) |
| 5973 | mstore(0x40, p1) |
| 5974 | mstore(0x60, p2) |
| 5975 | mstore(0x80, p3) |
| 5976 | } |
| 5977 | _sendLogPayload(0x1c, 0x84); |
| 5978 | assembly ("memory-safe") { |
| 5979 | mstore(0x00, m0) |
| 5980 | mstore(0x20, m1) |
| 5981 | mstore(0x40, m2) |
| 5982 | mstore(0x60, m3) |
| 5983 | mstore(0x80, m4) |
| 5984 | } |
| 5985 | } |
| 5986 | |
| 5987 | function log(bool p0, bool p1, bool p2, bool p3) internal pure { |
| 5988 | bytes32 m0; |
| 5989 | bytes32 m1; |
| 5990 | bytes32 m2; |
| 5991 | bytes32 m3; |
| 5992 | bytes32 m4; |
| 5993 | assembly ("memory-safe") { |
| 5994 | m0 := mload(0x00) |
| 5995 | m1 := mload(0x20) |
| 5996 | m2 := mload(0x40) |
| 5997 | m3 := mload(0x60) |
| 5998 | m4 := mload(0x80) |
| 5999 | // Selector of `log(bool,bool,bool,bool)`. |
| 6000 | mstore(0x00, 0x3b2a5ce0) |
| 6001 | mstore(0x20, p0) |
| 6002 | mstore(0x40, p1) |
| 6003 | mstore(0x60, p2) |
| 6004 | mstore(0x80, p3) |
| 6005 | } |
| 6006 | _sendLogPayload(0x1c, 0x84); |
| 6007 | assembly ("memory-safe") { |
| 6008 | mstore(0x00, m0) |
| 6009 | mstore(0x20, m1) |
| 6010 | mstore(0x40, m2) |
| 6011 | mstore(0x60, m3) |
| 6012 | mstore(0x80, m4) |
| 6013 | } |
| 6014 | } |
| 6015 | |
| 6016 | function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { |
| 6017 | bytes32 m0; |
| 6018 | bytes32 m1; |
| 6019 | bytes32 m2; |
| 6020 | bytes32 m3; |
| 6021 | bytes32 m4; |
| 6022 | assembly ("memory-safe") { |
| 6023 | m0 := mload(0x00) |
| 6024 | m1 := mload(0x20) |
| 6025 | m2 := mload(0x40) |
| 6026 | m3 := mload(0x60) |
| 6027 | m4 := mload(0x80) |
| 6028 | // Selector of `log(bool,bool,bool,uint256)`. |
| 6029 | mstore(0x00, 0x6d7045c1) |
| 6030 | mstore(0x20, p0) |
| 6031 | mstore(0x40, p1) |
| 6032 | mstore(0x60, p2) |
| 6033 | mstore(0x80, p3) |
| 6034 | } |
| 6035 | _sendLogPayload(0x1c, 0x84); |
| 6036 | assembly ("memory-safe") { |
| 6037 | mstore(0x00, m0) |
| 6038 | mstore(0x20, m1) |
| 6039 | mstore(0x40, m2) |
| 6040 | mstore(0x60, m3) |
| 6041 | mstore(0x80, m4) |
| 6042 | } |
| 6043 | } |
| 6044 | |
| 6045 | function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure { |
| 6046 | bytes32 m0; |
| 6047 | bytes32 m1; |
| 6048 | bytes32 m2; |
| 6049 | bytes32 m3; |
| 6050 | bytes32 m4; |
| 6051 | bytes32 m5; |
| 6052 | bytes32 m6; |
| 6053 | assembly ("memory-safe") { |
| 6054 | function writeString(pos, w) { |
| 6055 | let length := 0 |
| 6056 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6057 | mstore(pos, length) |
| 6058 | let shift := sub(256, shl(3, length)) |
| 6059 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6060 | } |
| 6061 | m0 := mload(0x00) |
| 6062 | m1 := mload(0x20) |
| 6063 | m2 := mload(0x40) |
| 6064 | m3 := mload(0x60) |
| 6065 | m4 := mload(0x80) |
| 6066 | m5 := mload(0xa0) |
| 6067 | m6 := mload(0xc0) |
| 6068 | // Selector of `log(bool,bool,bool,string)`. |
| 6069 | mstore(0x00, 0x2ae408d4) |
| 6070 | mstore(0x20, p0) |
| 6071 | mstore(0x40, p1) |
| 6072 | mstore(0x60, p2) |
| 6073 | mstore(0x80, 0x80) |
| 6074 | writeString(0xa0, p3) |
| 6075 | } |
| 6076 | _sendLogPayload(0x1c, 0xc4); |
| 6077 | assembly ("memory-safe") { |
| 6078 | mstore(0x00, m0) |
| 6079 | mstore(0x20, m1) |
| 6080 | mstore(0x40, m2) |
| 6081 | mstore(0x60, m3) |
| 6082 | mstore(0x80, m4) |
| 6083 | mstore(0xa0, m5) |
| 6084 | mstore(0xc0, m6) |
| 6085 | } |
| 6086 | } |
| 6087 | |
| 6088 | function log(bool p0, bool p1, uint256 p2, address p3) internal pure { |
| 6089 | bytes32 m0; |
| 6090 | bytes32 m1; |
| 6091 | bytes32 m2; |
| 6092 | bytes32 m3; |
| 6093 | bytes32 m4; |
| 6094 | assembly ("memory-safe") { |
| 6095 | m0 := mload(0x00) |
| 6096 | m1 := mload(0x20) |
| 6097 | m2 := mload(0x40) |
| 6098 | m3 := mload(0x60) |
| 6099 | m4 := mload(0x80) |
| 6100 | // Selector of `log(bool,bool,uint256,address)`. |
| 6101 | mstore(0x00, 0x54a7a9a0) |
| 6102 | mstore(0x20, p0) |
| 6103 | mstore(0x40, p1) |
| 6104 | mstore(0x60, p2) |
| 6105 | mstore(0x80, p3) |
| 6106 | } |
| 6107 | _sendLogPayload(0x1c, 0x84); |
| 6108 | assembly ("memory-safe") { |
| 6109 | mstore(0x00, m0) |
| 6110 | mstore(0x20, m1) |
| 6111 | mstore(0x40, m2) |
| 6112 | mstore(0x60, m3) |
| 6113 | mstore(0x80, m4) |
| 6114 | } |
| 6115 | } |
| 6116 | |
| 6117 | function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { |
| 6118 | bytes32 m0; |
| 6119 | bytes32 m1; |
| 6120 | bytes32 m2; |
| 6121 | bytes32 m3; |
| 6122 | bytes32 m4; |
| 6123 | assembly ("memory-safe") { |
| 6124 | m0 := mload(0x00) |
| 6125 | m1 := mload(0x20) |
| 6126 | m2 := mload(0x40) |
| 6127 | m3 := mload(0x60) |
| 6128 | m4 := mload(0x80) |
| 6129 | // Selector of `log(bool,bool,uint256,bool)`. |
| 6130 | mstore(0x00, 0x619e4d0e) |
| 6131 | mstore(0x20, p0) |
| 6132 | mstore(0x40, p1) |
| 6133 | mstore(0x60, p2) |
| 6134 | mstore(0x80, p3) |
| 6135 | } |
| 6136 | _sendLogPayload(0x1c, 0x84); |
| 6137 | assembly ("memory-safe") { |
| 6138 | mstore(0x00, m0) |
| 6139 | mstore(0x20, m1) |
| 6140 | mstore(0x40, m2) |
| 6141 | mstore(0x60, m3) |
| 6142 | mstore(0x80, m4) |
| 6143 | } |
| 6144 | } |
| 6145 | |
| 6146 | function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 6147 | bytes32 m0; |
| 6148 | bytes32 m1; |
| 6149 | bytes32 m2; |
| 6150 | bytes32 m3; |
| 6151 | bytes32 m4; |
| 6152 | assembly ("memory-safe") { |
| 6153 | m0 := mload(0x00) |
| 6154 | m1 := mload(0x20) |
| 6155 | m2 := mload(0x40) |
| 6156 | m3 := mload(0x60) |
| 6157 | m4 := mload(0x80) |
| 6158 | // Selector of `log(bool,bool,uint256,uint256)`. |
| 6159 | mstore(0x00, 0x0bb00eab) |
| 6160 | mstore(0x20, p0) |
| 6161 | mstore(0x40, p1) |
| 6162 | mstore(0x60, p2) |
| 6163 | mstore(0x80, p3) |
| 6164 | } |
| 6165 | _sendLogPayload(0x1c, 0x84); |
| 6166 | assembly ("memory-safe") { |
| 6167 | mstore(0x00, m0) |
| 6168 | mstore(0x20, m1) |
| 6169 | mstore(0x40, m2) |
| 6170 | mstore(0x60, m3) |
| 6171 | mstore(0x80, m4) |
| 6172 | } |
| 6173 | } |
| 6174 | |
| 6175 | function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure { |
| 6176 | bytes32 m0; |
| 6177 | bytes32 m1; |
| 6178 | bytes32 m2; |
| 6179 | bytes32 m3; |
| 6180 | bytes32 m4; |
| 6181 | bytes32 m5; |
| 6182 | bytes32 m6; |
| 6183 | assembly ("memory-safe") { |
| 6184 | function writeString(pos, w) { |
| 6185 | let length := 0 |
| 6186 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6187 | mstore(pos, length) |
| 6188 | let shift := sub(256, shl(3, length)) |
| 6189 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6190 | } |
| 6191 | m0 := mload(0x00) |
| 6192 | m1 := mload(0x20) |
| 6193 | m2 := mload(0x40) |
| 6194 | m3 := mload(0x60) |
| 6195 | m4 := mload(0x80) |
| 6196 | m5 := mload(0xa0) |
| 6197 | m6 := mload(0xc0) |
| 6198 | // Selector of `log(bool,bool,uint256,string)`. |
| 6199 | mstore(0x00, 0x7dd4d0e0) |
| 6200 | mstore(0x20, p0) |
| 6201 | mstore(0x40, p1) |
| 6202 | mstore(0x60, p2) |
| 6203 | mstore(0x80, 0x80) |
| 6204 | writeString(0xa0, p3) |
| 6205 | } |
| 6206 | _sendLogPayload(0x1c, 0xc4); |
| 6207 | assembly ("memory-safe") { |
| 6208 | mstore(0x00, m0) |
| 6209 | mstore(0x20, m1) |
| 6210 | mstore(0x40, m2) |
| 6211 | mstore(0x60, m3) |
| 6212 | mstore(0x80, m4) |
| 6213 | mstore(0xa0, m5) |
| 6214 | mstore(0xc0, m6) |
| 6215 | } |
| 6216 | } |
| 6217 | |
| 6218 | function log(bool p0, bool p1, bytes32 p2, address p3) internal pure { |
| 6219 | bytes32 m0; |
| 6220 | bytes32 m1; |
| 6221 | bytes32 m2; |
| 6222 | bytes32 m3; |
| 6223 | bytes32 m4; |
| 6224 | bytes32 m5; |
| 6225 | bytes32 m6; |
| 6226 | assembly ("memory-safe") { |
| 6227 | function writeString(pos, w) { |
| 6228 | let length := 0 |
| 6229 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6230 | mstore(pos, length) |
| 6231 | let shift := sub(256, shl(3, length)) |
| 6232 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6233 | } |
| 6234 | m0 := mload(0x00) |
| 6235 | m1 := mload(0x20) |
| 6236 | m2 := mload(0x40) |
| 6237 | m3 := mload(0x60) |
| 6238 | m4 := mload(0x80) |
| 6239 | m5 := mload(0xa0) |
| 6240 | m6 := mload(0xc0) |
| 6241 | // Selector of `log(bool,bool,string,address)`. |
| 6242 | mstore(0x00, 0xf9ad2b89) |
| 6243 | mstore(0x20, p0) |
| 6244 | mstore(0x40, p1) |
| 6245 | mstore(0x60, 0x80) |
| 6246 | mstore(0x80, p3) |
| 6247 | writeString(0xa0, p2) |
| 6248 | } |
| 6249 | _sendLogPayload(0x1c, 0xc4); |
| 6250 | assembly ("memory-safe") { |
| 6251 | mstore(0x00, m0) |
| 6252 | mstore(0x20, m1) |
| 6253 | mstore(0x40, m2) |
| 6254 | mstore(0x60, m3) |
| 6255 | mstore(0x80, m4) |
| 6256 | mstore(0xa0, m5) |
| 6257 | mstore(0xc0, m6) |
| 6258 | } |
| 6259 | } |
| 6260 | |
| 6261 | function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure { |
| 6262 | bytes32 m0; |
| 6263 | bytes32 m1; |
| 6264 | bytes32 m2; |
| 6265 | bytes32 m3; |
| 6266 | bytes32 m4; |
| 6267 | bytes32 m5; |
| 6268 | bytes32 m6; |
| 6269 | assembly ("memory-safe") { |
| 6270 | function writeString(pos, w) { |
| 6271 | let length := 0 |
| 6272 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6273 | mstore(pos, length) |
| 6274 | let shift := sub(256, shl(3, length)) |
| 6275 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6276 | } |
| 6277 | m0 := mload(0x00) |
| 6278 | m1 := mload(0x20) |
| 6279 | m2 := mload(0x40) |
| 6280 | m3 := mload(0x60) |
| 6281 | m4 := mload(0x80) |
| 6282 | m5 := mload(0xa0) |
| 6283 | m6 := mload(0xc0) |
| 6284 | // Selector of `log(bool,bool,string,bool)`. |
| 6285 | mstore(0x00, 0xb857163a) |
| 6286 | mstore(0x20, p0) |
| 6287 | mstore(0x40, p1) |
| 6288 | mstore(0x60, 0x80) |
| 6289 | mstore(0x80, p3) |
| 6290 | writeString(0xa0, p2) |
| 6291 | } |
| 6292 | _sendLogPayload(0x1c, 0xc4); |
| 6293 | assembly ("memory-safe") { |
| 6294 | mstore(0x00, m0) |
| 6295 | mstore(0x20, m1) |
| 6296 | mstore(0x40, m2) |
| 6297 | mstore(0x60, m3) |
| 6298 | mstore(0x80, m4) |
| 6299 | mstore(0xa0, m5) |
| 6300 | mstore(0xc0, m6) |
| 6301 | } |
| 6302 | } |
| 6303 | |
| 6304 | function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure { |
| 6305 | bytes32 m0; |
| 6306 | bytes32 m1; |
| 6307 | bytes32 m2; |
| 6308 | bytes32 m3; |
| 6309 | bytes32 m4; |
| 6310 | bytes32 m5; |
| 6311 | bytes32 m6; |
| 6312 | assembly ("memory-safe") { |
| 6313 | function writeString(pos, w) { |
| 6314 | let length := 0 |
| 6315 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6316 | mstore(pos, length) |
| 6317 | let shift := sub(256, shl(3, length)) |
| 6318 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6319 | } |
| 6320 | m0 := mload(0x00) |
| 6321 | m1 := mload(0x20) |
| 6322 | m2 := mload(0x40) |
| 6323 | m3 := mload(0x60) |
| 6324 | m4 := mload(0x80) |
| 6325 | m5 := mload(0xa0) |
| 6326 | m6 := mload(0xc0) |
| 6327 | // Selector of `log(bool,bool,string,uint256)`. |
| 6328 | mstore(0x00, 0xe3a9ca2f) |
| 6329 | mstore(0x20, p0) |
| 6330 | mstore(0x40, p1) |
| 6331 | mstore(0x60, 0x80) |
| 6332 | mstore(0x80, p3) |
| 6333 | writeString(0xa0, p2) |
| 6334 | } |
| 6335 | _sendLogPayload(0x1c, 0xc4); |
| 6336 | assembly ("memory-safe") { |
| 6337 | mstore(0x00, m0) |
| 6338 | mstore(0x20, m1) |
| 6339 | mstore(0x40, m2) |
| 6340 | mstore(0x60, m3) |
| 6341 | mstore(0x80, m4) |
| 6342 | mstore(0xa0, m5) |
| 6343 | mstore(0xc0, m6) |
| 6344 | } |
| 6345 | } |
| 6346 | |
| 6347 | function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure { |
| 6348 | bytes32 m0; |
| 6349 | bytes32 m1; |
| 6350 | bytes32 m2; |
| 6351 | bytes32 m3; |
| 6352 | bytes32 m4; |
| 6353 | bytes32 m5; |
| 6354 | bytes32 m6; |
| 6355 | bytes32 m7; |
| 6356 | bytes32 m8; |
| 6357 | assembly ("memory-safe") { |
| 6358 | function writeString(pos, w) { |
| 6359 | let length := 0 |
| 6360 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6361 | mstore(pos, length) |
| 6362 | let shift := sub(256, shl(3, length)) |
| 6363 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6364 | } |
| 6365 | m0 := mload(0x00) |
| 6366 | m1 := mload(0x20) |
| 6367 | m2 := mload(0x40) |
| 6368 | m3 := mload(0x60) |
| 6369 | m4 := mload(0x80) |
| 6370 | m5 := mload(0xa0) |
| 6371 | m6 := mload(0xc0) |
| 6372 | m7 := mload(0xe0) |
| 6373 | m8 := mload(0x100) |
| 6374 | // Selector of `log(bool,bool,string,string)`. |
| 6375 | mstore(0x00, 0x6d1e8751) |
| 6376 | mstore(0x20, p0) |
| 6377 | mstore(0x40, p1) |
| 6378 | mstore(0x60, 0x80) |
| 6379 | mstore(0x80, 0xc0) |
| 6380 | writeString(0xa0, p2) |
| 6381 | writeString(0xe0, p3) |
| 6382 | } |
| 6383 | _sendLogPayload(0x1c, 0x104); |
| 6384 | assembly ("memory-safe") { |
| 6385 | mstore(0x00, m0) |
| 6386 | mstore(0x20, m1) |
| 6387 | mstore(0x40, m2) |
| 6388 | mstore(0x60, m3) |
| 6389 | mstore(0x80, m4) |
| 6390 | mstore(0xa0, m5) |
| 6391 | mstore(0xc0, m6) |
| 6392 | mstore(0xe0, m7) |
| 6393 | mstore(0x100, m8) |
| 6394 | } |
| 6395 | } |
| 6396 | |
| 6397 | function log(bool p0, uint256 p1, address p2, address p3) internal pure { |
| 6398 | bytes32 m0; |
| 6399 | bytes32 m1; |
| 6400 | bytes32 m2; |
| 6401 | bytes32 m3; |
| 6402 | bytes32 m4; |
| 6403 | assembly ("memory-safe") { |
| 6404 | m0 := mload(0x00) |
| 6405 | m1 := mload(0x20) |
| 6406 | m2 := mload(0x40) |
| 6407 | m3 := mload(0x60) |
| 6408 | m4 := mload(0x80) |
| 6409 | // Selector of `log(bool,uint256,address,address)`. |
| 6410 | mstore(0x00, 0x26f560a8) |
| 6411 | mstore(0x20, p0) |
| 6412 | mstore(0x40, p1) |
| 6413 | mstore(0x60, p2) |
| 6414 | mstore(0x80, p3) |
| 6415 | } |
| 6416 | _sendLogPayload(0x1c, 0x84); |
| 6417 | assembly ("memory-safe") { |
| 6418 | mstore(0x00, m0) |
| 6419 | mstore(0x20, m1) |
| 6420 | mstore(0x40, m2) |
| 6421 | mstore(0x60, m3) |
| 6422 | mstore(0x80, m4) |
| 6423 | } |
| 6424 | } |
| 6425 | |
| 6426 | function log(bool p0, uint256 p1, address p2, bool p3) internal pure { |
| 6427 | bytes32 m0; |
| 6428 | bytes32 m1; |
| 6429 | bytes32 m2; |
| 6430 | bytes32 m3; |
| 6431 | bytes32 m4; |
| 6432 | assembly ("memory-safe") { |
| 6433 | m0 := mload(0x00) |
| 6434 | m1 := mload(0x20) |
| 6435 | m2 := mload(0x40) |
| 6436 | m3 := mload(0x60) |
| 6437 | m4 := mload(0x80) |
| 6438 | // Selector of `log(bool,uint256,address,bool)`. |
| 6439 | mstore(0x00, 0xb4c314ff) |
| 6440 | mstore(0x20, p0) |
| 6441 | mstore(0x40, p1) |
| 6442 | mstore(0x60, p2) |
| 6443 | mstore(0x80, p3) |
| 6444 | } |
| 6445 | _sendLogPayload(0x1c, 0x84); |
| 6446 | assembly ("memory-safe") { |
| 6447 | mstore(0x00, m0) |
| 6448 | mstore(0x20, m1) |
| 6449 | mstore(0x40, m2) |
| 6450 | mstore(0x60, m3) |
| 6451 | mstore(0x80, m4) |
| 6452 | } |
| 6453 | } |
| 6454 | |
| 6455 | function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 6456 | bytes32 m0; |
| 6457 | bytes32 m1; |
| 6458 | bytes32 m2; |
| 6459 | bytes32 m3; |
| 6460 | bytes32 m4; |
| 6461 | assembly ("memory-safe") { |
| 6462 | m0 := mload(0x00) |
| 6463 | m1 := mload(0x20) |
| 6464 | m2 := mload(0x40) |
| 6465 | m3 := mload(0x60) |
| 6466 | m4 := mload(0x80) |
| 6467 | // Selector of `log(bool,uint256,address,uint256)`. |
| 6468 | mstore(0x00, 0x1537dc87) |
| 6469 | mstore(0x20, p0) |
| 6470 | mstore(0x40, p1) |
| 6471 | mstore(0x60, p2) |
| 6472 | mstore(0x80, p3) |
| 6473 | } |
| 6474 | _sendLogPayload(0x1c, 0x84); |
| 6475 | assembly ("memory-safe") { |
| 6476 | mstore(0x00, m0) |
| 6477 | mstore(0x20, m1) |
| 6478 | mstore(0x40, m2) |
| 6479 | mstore(0x60, m3) |
| 6480 | mstore(0x80, m4) |
| 6481 | } |
| 6482 | } |
| 6483 | |
| 6484 | function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure { |
| 6485 | bytes32 m0; |
| 6486 | bytes32 m1; |
| 6487 | bytes32 m2; |
| 6488 | bytes32 m3; |
| 6489 | bytes32 m4; |
| 6490 | bytes32 m5; |
| 6491 | bytes32 m6; |
| 6492 | assembly ("memory-safe") { |
| 6493 | function writeString(pos, w) { |
| 6494 | let length := 0 |
| 6495 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6496 | mstore(pos, length) |
| 6497 | let shift := sub(256, shl(3, length)) |
| 6498 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6499 | } |
| 6500 | m0 := mload(0x00) |
| 6501 | m1 := mload(0x20) |
| 6502 | m2 := mload(0x40) |
| 6503 | m3 := mload(0x60) |
| 6504 | m4 := mload(0x80) |
| 6505 | m5 := mload(0xa0) |
| 6506 | m6 := mload(0xc0) |
| 6507 | // Selector of `log(bool,uint256,address,string)`. |
| 6508 | mstore(0x00, 0x1bb3b09a) |
| 6509 | mstore(0x20, p0) |
| 6510 | mstore(0x40, p1) |
| 6511 | mstore(0x60, p2) |
| 6512 | mstore(0x80, 0x80) |
| 6513 | writeString(0xa0, p3) |
| 6514 | } |
| 6515 | _sendLogPayload(0x1c, 0xc4); |
| 6516 | assembly ("memory-safe") { |
| 6517 | mstore(0x00, m0) |
| 6518 | mstore(0x20, m1) |
| 6519 | mstore(0x40, m2) |
| 6520 | mstore(0x60, m3) |
| 6521 | mstore(0x80, m4) |
| 6522 | mstore(0xa0, m5) |
| 6523 | mstore(0xc0, m6) |
| 6524 | } |
| 6525 | } |
| 6526 | |
| 6527 | function log(bool p0, uint256 p1, bool p2, address p3) internal pure { |
| 6528 | bytes32 m0; |
| 6529 | bytes32 m1; |
| 6530 | bytes32 m2; |
| 6531 | bytes32 m3; |
| 6532 | bytes32 m4; |
| 6533 | assembly ("memory-safe") { |
| 6534 | m0 := mload(0x00) |
| 6535 | m1 := mload(0x20) |
| 6536 | m2 := mload(0x40) |
| 6537 | m3 := mload(0x60) |
| 6538 | m4 := mload(0x80) |
| 6539 | // Selector of `log(bool,uint256,bool,address)`. |
| 6540 | mstore(0x00, 0x9acd3616) |
| 6541 | mstore(0x20, p0) |
| 6542 | mstore(0x40, p1) |
| 6543 | mstore(0x60, p2) |
| 6544 | mstore(0x80, p3) |
| 6545 | } |
| 6546 | _sendLogPayload(0x1c, 0x84); |
| 6547 | assembly ("memory-safe") { |
| 6548 | mstore(0x00, m0) |
| 6549 | mstore(0x20, m1) |
| 6550 | mstore(0x40, m2) |
| 6551 | mstore(0x60, m3) |
| 6552 | mstore(0x80, m4) |
| 6553 | } |
| 6554 | } |
| 6555 | |
| 6556 | function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { |
| 6557 | bytes32 m0; |
| 6558 | bytes32 m1; |
| 6559 | bytes32 m2; |
| 6560 | bytes32 m3; |
| 6561 | bytes32 m4; |
| 6562 | assembly ("memory-safe") { |
| 6563 | m0 := mload(0x00) |
| 6564 | m1 := mload(0x20) |
| 6565 | m2 := mload(0x40) |
| 6566 | m3 := mload(0x60) |
| 6567 | m4 := mload(0x80) |
| 6568 | // Selector of `log(bool,uint256,bool,bool)`. |
| 6569 | mstore(0x00, 0xceb5f4d7) |
| 6570 | mstore(0x20, p0) |
| 6571 | mstore(0x40, p1) |
| 6572 | mstore(0x60, p2) |
| 6573 | mstore(0x80, p3) |
| 6574 | } |
| 6575 | _sendLogPayload(0x1c, 0x84); |
| 6576 | assembly ("memory-safe") { |
| 6577 | mstore(0x00, m0) |
| 6578 | mstore(0x20, m1) |
| 6579 | mstore(0x40, m2) |
| 6580 | mstore(0x60, m3) |
| 6581 | mstore(0x80, m4) |
| 6582 | } |
| 6583 | } |
| 6584 | |
| 6585 | function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 6586 | bytes32 m0; |
| 6587 | bytes32 m1; |
| 6588 | bytes32 m2; |
| 6589 | bytes32 m3; |
| 6590 | bytes32 m4; |
| 6591 | assembly ("memory-safe") { |
| 6592 | m0 := mload(0x00) |
| 6593 | m1 := mload(0x20) |
| 6594 | m2 := mload(0x40) |
| 6595 | m3 := mload(0x60) |
| 6596 | m4 := mload(0x80) |
| 6597 | // Selector of `log(bool,uint256,bool,uint256)`. |
| 6598 | mstore(0x00, 0x7f9bbca2) |
| 6599 | mstore(0x20, p0) |
| 6600 | mstore(0x40, p1) |
| 6601 | mstore(0x60, p2) |
| 6602 | mstore(0x80, p3) |
| 6603 | } |
| 6604 | _sendLogPayload(0x1c, 0x84); |
| 6605 | assembly ("memory-safe") { |
| 6606 | mstore(0x00, m0) |
| 6607 | mstore(0x20, m1) |
| 6608 | mstore(0x40, m2) |
| 6609 | mstore(0x60, m3) |
| 6610 | mstore(0x80, m4) |
| 6611 | } |
| 6612 | } |
| 6613 | |
| 6614 | function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure { |
| 6615 | bytes32 m0; |
| 6616 | bytes32 m1; |
| 6617 | bytes32 m2; |
| 6618 | bytes32 m3; |
| 6619 | bytes32 m4; |
| 6620 | bytes32 m5; |
| 6621 | bytes32 m6; |
| 6622 | assembly ("memory-safe") { |
| 6623 | function writeString(pos, w) { |
| 6624 | let length := 0 |
| 6625 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6626 | mstore(pos, length) |
| 6627 | let shift := sub(256, shl(3, length)) |
| 6628 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6629 | } |
| 6630 | m0 := mload(0x00) |
| 6631 | m1 := mload(0x20) |
| 6632 | m2 := mload(0x40) |
| 6633 | m3 := mload(0x60) |
| 6634 | m4 := mload(0x80) |
| 6635 | m5 := mload(0xa0) |
| 6636 | m6 := mload(0xc0) |
| 6637 | // Selector of `log(bool,uint256,bool,string)`. |
| 6638 | mstore(0x00, 0x9143dbb1) |
| 6639 | mstore(0x20, p0) |
| 6640 | mstore(0x40, p1) |
| 6641 | mstore(0x60, p2) |
| 6642 | mstore(0x80, 0x80) |
| 6643 | writeString(0xa0, p3) |
| 6644 | } |
| 6645 | _sendLogPayload(0x1c, 0xc4); |
| 6646 | assembly ("memory-safe") { |
| 6647 | mstore(0x00, m0) |
| 6648 | mstore(0x20, m1) |
| 6649 | mstore(0x40, m2) |
| 6650 | mstore(0x60, m3) |
| 6651 | mstore(0x80, m4) |
| 6652 | mstore(0xa0, m5) |
| 6653 | mstore(0xc0, m6) |
| 6654 | } |
| 6655 | } |
| 6656 | |
| 6657 | function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 6658 | bytes32 m0; |
| 6659 | bytes32 m1; |
| 6660 | bytes32 m2; |
| 6661 | bytes32 m3; |
| 6662 | bytes32 m4; |
| 6663 | assembly ("memory-safe") { |
| 6664 | m0 := mload(0x00) |
| 6665 | m1 := mload(0x20) |
| 6666 | m2 := mload(0x40) |
| 6667 | m3 := mload(0x60) |
| 6668 | m4 := mload(0x80) |
| 6669 | // Selector of `log(bool,uint256,uint256,address)`. |
| 6670 | mstore(0x00, 0x00dd87b9) |
| 6671 | mstore(0x20, p0) |
| 6672 | mstore(0x40, p1) |
| 6673 | mstore(0x60, p2) |
| 6674 | mstore(0x80, p3) |
| 6675 | } |
| 6676 | _sendLogPayload(0x1c, 0x84); |
| 6677 | assembly ("memory-safe") { |
| 6678 | mstore(0x00, m0) |
| 6679 | mstore(0x20, m1) |
| 6680 | mstore(0x40, m2) |
| 6681 | mstore(0x60, m3) |
| 6682 | mstore(0x80, m4) |
| 6683 | } |
| 6684 | } |
| 6685 | |
| 6686 | function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 6687 | bytes32 m0; |
| 6688 | bytes32 m1; |
| 6689 | bytes32 m2; |
| 6690 | bytes32 m3; |
| 6691 | bytes32 m4; |
| 6692 | assembly ("memory-safe") { |
| 6693 | m0 := mload(0x00) |
| 6694 | m1 := mload(0x20) |
| 6695 | m2 := mload(0x40) |
| 6696 | m3 := mload(0x60) |
| 6697 | m4 := mload(0x80) |
| 6698 | // Selector of `log(bool,uint256,uint256,bool)`. |
| 6699 | mstore(0x00, 0xbe984353) |
| 6700 | mstore(0x20, p0) |
| 6701 | mstore(0x40, p1) |
| 6702 | mstore(0x60, p2) |
| 6703 | mstore(0x80, p3) |
| 6704 | } |
| 6705 | _sendLogPayload(0x1c, 0x84); |
| 6706 | assembly ("memory-safe") { |
| 6707 | mstore(0x00, m0) |
| 6708 | mstore(0x20, m1) |
| 6709 | mstore(0x40, m2) |
| 6710 | mstore(0x60, m3) |
| 6711 | mstore(0x80, m4) |
| 6712 | } |
| 6713 | } |
| 6714 | |
| 6715 | function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 6716 | bytes32 m0; |
| 6717 | bytes32 m1; |
| 6718 | bytes32 m2; |
| 6719 | bytes32 m3; |
| 6720 | bytes32 m4; |
| 6721 | assembly ("memory-safe") { |
| 6722 | m0 := mload(0x00) |
| 6723 | m1 := mload(0x20) |
| 6724 | m2 := mload(0x40) |
| 6725 | m3 := mload(0x60) |
| 6726 | m4 := mload(0x80) |
| 6727 | // Selector of `log(bool,uint256,uint256,uint256)`. |
| 6728 | mstore(0x00, 0x374bb4b2) |
| 6729 | mstore(0x20, p0) |
| 6730 | mstore(0x40, p1) |
| 6731 | mstore(0x60, p2) |
| 6732 | mstore(0x80, p3) |
| 6733 | } |
| 6734 | _sendLogPayload(0x1c, 0x84); |
| 6735 | assembly ("memory-safe") { |
| 6736 | mstore(0x00, m0) |
| 6737 | mstore(0x20, m1) |
| 6738 | mstore(0x40, m2) |
| 6739 | mstore(0x60, m3) |
| 6740 | mstore(0x80, m4) |
| 6741 | } |
| 6742 | } |
| 6743 | |
| 6744 | function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { |
| 6745 | bytes32 m0; |
| 6746 | bytes32 m1; |
| 6747 | bytes32 m2; |
| 6748 | bytes32 m3; |
| 6749 | bytes32 m4; |
| 6750 | bytes32 m5; |
| 6751 | bytes32 m6; |
| 6752 | assembly ("memory-safe") { |
| 6753 | function writeString(pos, w) { |
| 6754 | let length := 0 |
| 6755 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6756 | mstore(pos, length) |
| 6757 | let shift := sub(256, shl(3, length)) |
| 6758 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6759 | } |
| 6760 | m0 := mload(0x00) |
| 6761 | m1 := mload(0x20) |
| 6762 | m2 := mload(0x40) |
| 6763 | m3 := mload(0x60) |
| 6764 | m4 := mload(0x80) |
| 6765 | m5 := mload(0xa0) |
| 6766 | m6 := mload(0xc0) |
| 6767 | // Selector of `log(bool,uint256,uint256,string)`. |
| 6768 | mstore(0x00, 0x8e69fb5d) |
| 6769 | mstore(0x20, p0) |
| 6770 | mstore(0x40, p1) |
| 6771 | mstore(0x60, p2) |
| 6772 | mstore(0x80, 0x80) |
| 6773 | writeString(0xa0, p3) |
| 6774 | } |
| 6775 | _sendLogPayload(0x1c, 0xc4); |
| 6776 | assembly ("memory-safe") { |
| 6777 | mstore(0x00, m0) |
| 6778 | mstore(0x20, m1) |
| 6779 | mstore(0x40, m2) |
| 6780 | mstore(0x60, m3) |
| 6781 | mstore(0x80, m4) |
| 6782 | mstore(0xa0, m5) |
| 6783 | mstore(0xc0, m6) |
| 6784 | } |
| 6785 | } |
| 6786 | |
| 6787 | function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure { |
| 6788 | bytes32 m0; |
| 6789 | bytes32 m1; |
| 6790 | bytes32 m2; |
| 6791 | bytes32 m3; |
| 6792 | bytes32 m4; |
| 6793 | bytes32 m5; |
| 6794 | bytes32 m6; |
| 6795 | assembly ("memory-safe") { |
| 6796 | function writeString(pos, w) { |
| 6797 | let length := 0 |
| 6798 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6799 | mstore(pos, length) |
| 6800 | let shift := sub(256, shl(3, length)) |
| 6801 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6802 | } |
| 6803 | m0 := mload(0x00) |
| 6804 | m1 := mload(0x20) |
| 6805 | m2 := mload(0x40) |
| 6806 | m3 := mload(0x60) |
| 6807 | m4 := mload(0x80) |
| 6808 | m5 := mload(0xa0) |
| 6809 | m6 := mload(0xc0) |
| 6810 | // Selector of `log(bool,uint256,string,address)`. |
| 6811 | mstore(0x00, 0xfedd1fff) |
| 6812 | mstore(0x20, p0) |
| 6813 | mstore(0x40, p1) |
| 6814 | mstore(0x60, 0x80) |
| 6815 | mstore(0x80, p3) |
| 6816 | writeString(0xa0, p2) |
| 6817 | } |
| 6818 | _sendLogPayload(0x1c, 0xc4); |
| 6819 | assembly ("memory-safe") { |
| 6820 | mstore(0x00, m0) |
| 6821 | mstore(0x20, m1) |
| 6822 | mstore(0x40, m2) |
| 6823 | mstore(0x60, m3) |
| 6824 | mstore(0x80, m4) |
| 6825 | mstore(0xa0, m5) |
| 6826 | mstore(0xc0, m6) |
| 6827 | } |
| 6828 | } |
| 6829 | |
| 6830 | function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure { |
| 6831 | bytes32 m0; |
| 6832 | bytes32 m1; |
| 6833 | bytes32 m2; |
| 6834 | bytes32 m3; |
| 6835 | bytes32 m4; |
| 6836 | bytes32 m5; |
| 6837 | bytes32 m6; |
| 6838 | assembly ("memory-safe") { |
| 6839 | function writeString(pos, w) { |
| 6840 | let length := 0 |
| 6841 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6842 | mstore(pos, length) |
| 6843 | let shift := sub(256, shl(3, length)) |
| 6844 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6845 | } |
| 6846 | m0 := mload(0x00) |
| 6847 | m1 := mload(0x20) |
| 6848 | m2 := mload(0x40) |
| 6849 | m3 := mload(0x60) |
| 6850 | m4 := mload(0x80) |
| 6851 | m5 := mload(0xa0) |
| 6852 | m6 := mload(0xc0) |
| 6853 | // Selector of `log(bool,uint256,string,bool)`. |
| 6854 | mstore(0x00, 0xe5e70b2b) |
| 6855 | mstore(0x20, p0) |
| 6856 | mstore(0x40, p1) |
| 6857 | mstore(0x60, 0x80) |
| 6858 | mstore(0x80, p3) |
| 6859 | writeString(0xa0, p2) |
| 6860 | } |
| 6861 | _sendLogPayload(0x1c, 0xc4); |
| 6862 | assembly ("memory-safe") { |
| 6863 | mstore(0x00, m0) |
| 6864 | mstore(0x20, m1) |
| 6865 | mstore(0x40, m2) |
| 6866 | mstore(0x60, m3) |
| 6867 | mstore(0x80, m4) |
| 6868 | mstore(0xa0, m5) |
| 6869 | mstore(0xc0, m6) |
| 6870 | } |
| 6871 | } |
| 6872 | |
| 6873 | function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { |
| 6874 | bytes32 m0; |
| 6875 | bytes32 m1; |
| 6876 | bytes32 m2; |
| 6877 | bytes32 m3; |
| 6878 | bytes32 m4; |
| 6879 | bytes32 m5; |
| 6880 | bytes32 m6; |
| 6881 | assembly ("memory-safe") { |
| 6882 | function writeString(pos, w) { |
| 6883 | let length := 0 |
| 6884 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6885 | mstore(pos, length) |
| 6886 | let shift := sub(256, shl(3, length)) |
| 6887 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6888 | } |
| 6889 | m0 := mload(0x00) |
| 6890 | m1 := mload(0x20) |
| 6891 | m2 := mload(0x40) |
| 6892 | m3 := mload(0x60) |
| 6893 | m4 := mload(0x80) |
| 6894 | m5 := mload(0xa0) |
| 6895 | m6 := mload(0xc0) |
| 6896 | // Selector of `log(bool,uint256,string,uint256)`. |
| 6897 | mstore(0x00, 0x6a1199e2) |
| 6898 | mstore(0x20, p0) |
| 6899 | mstore(0x40, p1) |
| 6900 | mstore(0x60, 0x80) |
| 6901 | mstore(0x80, p3) |
| 6902 | writeString(0xa0, p2) |
| 6903 | } |
| 6904 | _sendLogPayload(0x1c, 0xc4); |
| 6905 | assembly ("memory-safe") { |
| 6906 | mstore(0x00, m0) |
| 6907 | mstore(0x20, m1) |
| 6908 | mstore(0x40, m2) |
| 6909 | mstore(0x60, m3) |
| 6910 | mstore(0x80, m4) |
| 6911 | mstore(0xa0, m5) |
| 6912 | mstore(0xc0, m6) |
| 6913 | } |
| 6914 | } |
| 6915 | |
| 6916 | function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { |
| 6917 | bytes32 m0; |
| 6918 | bytes32 m1; |
| 6919 | bytes32 m2; |
| 6920 | bytes32 m3; |
| 6921 | bytes32 m4; |
| 6922 | bytes32 m5; |
| 6923 | bytes32 m6; |
| 6924 | bytes32 m7; |
| 6925 | bytes32 m8; |
| 6926 | assembly ("memory-safe") { |
| 6927 | function writeString(pos, w) { |
| 6928 | let length := 0 |
| 6929 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6930 | mstore(pos, length) |
| 6931 | let shift := sub(256, shl(3, length)) |
| 6932 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6933 | } |
| 6934 | m0 := mload(0x00) |
| 6935 | m1 := mload(0x20) |
| 6936 | m2 := mload(0x40) |
| 6937 | m3 := mload(0x60) |
| 6938 | m4 := mload(0x80) |
| 6939 | m5 := mload(0xa0) |
| 6940 | m6 := mload(0xc0) |
| 6941 | m7 := mload(0xe0) |
| 6942 | m8 := mload(0x100) |
| 6943 | // Selector of `log(bool,uint256,string,string)`. |
| 6944 | mstore(0x00, 0xf5bc2249) |
| 6945 | mstore(0x20, p0) |
| 6946 | mstore(0x40, p1) |
| 6947 | mstore(0x60, 0x80) |
| 6948 | mstore(0x80, 0xc0) |
| 6949 | writeString(0xa0, p2) |
| 6950 | writeString(0xe0, p3) |
| 6951 | } |
| 6952 | _sendLogPayload(0x1c, 0x104); |
| 6953 | assembly ("memory-safe") { |
| 6954 | mstore(0x00, m0) |
| 6955 | mstore(0x20, m1) |
| 6956 | mstore(0x40, m2) |
| 6957 | mstore(0x60, m3) |
| 6958 | mstore(0x80, m4) |
| 6959 | mstore(0xa0, m5) |
| 6960 | mstore(0xc0, m6) |
| 6961 | mstore(0xe0, m7) |
| 6962 | mstore(0x100, m8) |
| 6963 | } |
| 6964 | } |
| 6965 | |
| 6966 | function log(bool p0, bytes32 p1, address p2, address p3) internal pure { |
| 6967 | bytes32 m0; |
| 6968 | bytes32 m1; |
| 6969 | bytes32 m2; |
| 6970 | bytes32 m3; |
| 6971 | bytes32 m4; |
| 6972 | bytes32 m5; |
| 6973 | bytes32 m6; |
| 6974 | assembly ("memory-safe") { |
| 6975 | function writeString(pos, w) { |
| 6976 | let length := 0 |
| 6977 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 6978 | mstore(pos, length) |
| 6979 | let shift := sub(256, shl(3, length)) |
| 6980 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 6981 | } |
| 6982 | m0 := mload(0x00) |
| 6983 | m1 := mload(0x20) |
| 6984 | m2 := mload(0x40) |
| 6985 | m3 := mload(0x60) |
| 6986 | m4 := mload(0x80) |
| 6987 | m5 := mload(0xa0) |
| 6988 | m6 := mload(0xc0) |
| 6989 | // Selector of `log(bool,string,address,address)`. |
| 6990 | mstore(0x00, 0x2b2b18dc) |
| 6991 | mstore(0x20, p0) |
| 6992 | mstore(0x40, 0x80) |
| 6993 | mstore(0x60, p2) |
| 6994 | mstore(0x80, p3) |
| 6995 | writeString(0xa0, p1) |
| 6996 | } |
| 6997 | _sendLogPayload(0x1c, 0xc4); |
| 6998 | assembly ("memory-safe") { |
| 6999 | mstore(0x00, m0) |
| 7000 | mstore(0x20, m1) |
| 7001 | mstore(0x40, m2) |
| 7002 | mstore(0x60, m3) |
| 7003 | mstore(0x80, m4) |
| 7004 | mstore(0xa0, m5) |
| 7005 | mstore(0xc0, m6) |
| 7006 | } |
| 7007 | } |
| 7008 | |
| 7009 | function log(bool p0, bytes32 p1, address p2, bool p3) internal pure { |
| 7010 | bytes32 m0; |
| 7011 | bytes32 m1; |
| 7012 | bytes32 m2; |
| 7013 | bytes32 m3; |
| 7014 | bytes32 m4; |
| 7015 | bytes32 m5; |
| 7016 | bytes32 m6; |
| 7017 | assembly ("memory-safe") { |
| 7018 | function writeString(pos, w) { |
| 7019 | let length := 0 |
| 7020 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7021 | mstore(pos, length) |
| 7022 | let shift := sub(256, shl(3, length)) |
| 7023 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7024 | } |
| 7025 | m0 := mload(0x00) |
| 7026 | m1 := mload(0x20) |
| 7027 | m2 := mload(0x40) |
| 7028 | m3 := mload(0x60) |
| 7029 | m4 := mload(0x80) |
| 7030 | m5 := mload(0xa0) |
| 7031 | m6 := mload(0xc0) |
| 7032 | // Selector of `log(bool,string,address,bool)`. |
| 7033 | mstore(0x00, 0x6dd434ca) |
| 7034 | mstore(0x20, p0) |
| 7035 | mstore(0x40, 0x80) |
| 7036 | mstore(0x60, p2) |
| 7037 | mstore(0x80, p3) |
| 7038 | writeString(0xa0, p1) |
| 7039 | } |
| 7040 | _sendLogPayload(0x1c, 0xc4); |
| 7041 | assembly ("memory-safe") { |
| 7042 | mstore(0x00, m0) |
| 7043 | mstore(0x20, m1) |
| 7044 | mstore(0x40, m2) |
| 7045 | mstore(0x60, m3) |
| 7046 | mstore(0x80, m4) |
| 7047 | mstore(0xa0, m5) |
| 7048 | mstore(0xc0, m6) |
| 7049 | } |
| 7050 | } |
| 7051 | |
| 7052 | function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure { |
| 7053 | bytes32 m0; |
| 7054 | bytes32 m1; |
| 7055 | bytes32 m2; |
| 7056 | bytes32 m3; |
| 7057 | bytes32 m4; |
| 7058 | bytes32 m5; |
| 7059 | bytes32 m6; |
| 7060 | assembly ("memory-safe") { |
| 7061 | function writeString(pos, w) { |
| 7062 | let length := 0 |
| 7063 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7064 | mstore(pos, length) |
| 7065 | let shift := sub(256, shl(3, length)) |
| 7066 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7067 | } |
| 7068 | m0 := mload(0x00) |
| 7069 | m1 := mload(0x20) |
| 7070 | m2 := mload(0x40) |
| 7071 | m3 := mload(0x60) |
| 7072 | m4 := mload(0x80) |
| 7073 | m5 := mload(0xa0) |
| 7074 | m6 := mload(0xc0) |
| 7075 | // Selector of `log(bool,string,address,uint256)`. |
| 7076 | mstore(0x00, 0xa5cada94) |
| 7077 | mstore(0x20, p0) |
| 7078 | mstore(0x40, 0x80) |
| 7079 | mstore(0x60, p2) |
| 7080 | mstore(0x80, p3) |
| 7081 | writeString(0xa0, p1) |
| 7082 | } |
| 7083 | _sendLogPayload(0x1c, 0xc4); |
| 7084 | assembly ("memory-safe") { |
| 7085 | mstore(0x00, m0) |
| 7086 | mstore(0x20, m1) |
| 7087 | mstore(0x40, m2) |
| 7088 | mstore(0x60, m3) |
| 7089 | mstore(0x80, m4) |
| 7090 | mstore(0xa0, m5) |
| 7091 | mstore(0xc0, m6) |
| 7092 | } |
| 7093 | } |
| 7094 | |
| 7095 | function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure { |
| 7096 | bytes32 m0; |
| 7097 | bytes32 m1; |
| 7098 | bytes32 m2; |
| 7099 | bytes32 m3; |
| 7100 | bytes32 m4; |
| 7101 | bytes32 m5; |
| 7102 | bytes32 m6; |
| 7103 | bytes32 m7; |
| 7104 | bytes32 m8; |
| 7105 | assembly ("memory-safe") { |
| 7106 | function writeString(pos, w) { |
| 7107 | let length := 0 |
| 7108 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7109 | mstore(pos, length) |
| 7110 | let shift := sub(256, shl(3, length)) |
| 7111 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7112 | } |
| 7113 | m0 := mload(0x00) |
| 7114 | m1 := mload(0x20) |
| 7115 | m2 := mload(0x40) |
| 7116 | m3 := mload(0x60) |
| 7117 | m4 := mload(0x80) |
| 7118 | m5 := mload(0xa0) |
| 7119 | m6 := mload(0xc0) |
| 7120 | m7 := mload(0xe0) |
| 7121 | m8 := mload(0x100) |
| 7122 | // Selector of `log(bool,string,address,string)`. |
| 7123 | mstore(0x00, 0x12d6c788) |
| 7124 | mstore(0x20, p0) |
| 7125 | mstore(0x40, 0x80) |
| 7126 | mstore(0x60, p2) |
| 7127 | mstore(0x80, 0xc0) |
| 7128 | writeString(0xa0, p1) |
| 7129 | writeString(0xe0, p3) |
| 7130 | } |
| 7131 | _sendLogPayload(0x1c, 0x104); |
| 7132 | assembly ("memory-safe") { |
| 7133 | mstore(0x00, m0) |
| 7134 | mstore(0x20, m1) |
| 7135 | mstore(0x40, m2) |
| 7136 | mstore(0x60, m3) |
| 7137 | mstore(0x80, m4) |
| 7138 | mstore(0xa0, m5) |
| 7139 | mstore(0xc0, m6) |
| 7140 | mstore(0xe0, m7) |
| 7141 | mstore(0x100, m8) |
| 7142 | } |
| 7143 | } |
| 7144 | |
| 7145 | function log(bool p0, bytes32 p1, bool p2, address p3) internal pure { |
| 7146 | bytes32 m0; |
| 7147 | bytes32 m1; |
| 7148 | bytes32 m2; |
| 7149 | bytes32 m3; |
| 7150 | bytes32 m4; |
| 7151 | bytes32 m5; |
| 7152 | bytes32 m6; |
| 7153 | assembly ("memory-safe") { |
| 7154 | function writeString(pos, w) { |
| 7155 | let length := 0 |
| 7156 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7157 | mstore(pos, length) |
| 7158 | let shift := sub(256, shl(3, length)) |
| 7159 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7160 | } |
| 7161 | m0 := mload(0x00) |
| 7162 | m1 := mload(0x20) |
| 7163 | m2 := mload(0x40) |
| 7164 | m3 := mload(0x60) |
| 7165 | m4 := mload(0x80) |
| 7166 | m5 := mload(0xa0) |
| 7167 | m6 := mload(0xc0) |
| 7168 | // Selector of `log(bool,string,bool,address)`. |
| 7169 | mstore(0x00, 0x538e06ab) |
| 7170 | mstore(0x20, p0) |
| 7171 | mstore(0x40, 0x80) |
| 7172 | mstore(0x60, p2) |
| 7173 | mstore(0x80, p3) |
| 7174 | writeString(0xa0, p1) |
| 7175 | } |
| 7176 | _sendLogPayload(0x1c, 0xc4); |
| 7177 | assembly ("memory-safe") { |
| 7178 | mstore(0x00, m0) |
| 7179 | mstore(0x20, m1) |
| 7180 | mstore(0x40, m2) |
| 7181 | mstore(0x60, m3) |
| 7182 | mstore(0x80, m4) |
| 7183 | mstore(0xa0, m5) |
| 7184 | mstore(0xc0, m6) |
| 7185 | } |
| 7186 | } |
| 7187 | |
| 7188 | function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure { |
| 7189 | bytes32 m0; |
| 7190 | bytes32 m1; |
| 7191 | bytes32 m2; |
| 7192 | bytes32 m3; |
| 7193 | bytes32 m4; |
| 7194 | bytes32 m5; |
| 7195 | bytes32 m6; |
| 7196 | assembly ("memory-safe") { |
| 7197 | function writeString(pos, w) { |
| 7198 | let length := 0 |
| 7199 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7200 | mstore(pos, length) |
| 7201 | let shift := sub(256, shl(3, length)) |
| 7202 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7203 | } |
| 7204 | m0 := mload(0x00) |
| 7205 | m1 := mload(0x20) |
| 7206 | m2 := mload(0x40) |
| 7207 | m3 := mload(0x60) |
| 7208 | m4 := mload(0x80) |
| 7209 | m5 := mload(0xa0) |
| 7210 | m6 := mload(0xc0) |
| 7211 | // Selector of `log(bool,string,bool,bool)`. |
| 7212 | mstore(0x00, 0xdc5e935b) |
| 7213 | mstore(0x20, p0) |
| 7214 | mstore(0x40, 0x80) |
| 7215 | mstore(0x60, p2) |
| 7216 | mstore(0x80, p3) |
| 7217 | writeString(0xa0, p1) |
| 7218 | } |
| 7219 | _sendLogPayload(0x1c, 0xc4); |
| 7220 | assembly ("memory-safe") { |
| 7221 | mstore(0x00, m0) |
| 7222 | mstore(0x20, m1) |
| 7223 | mstore(0x40, m2) |
| 7224 | mstore(0x60, m3) |
| 7225 | mstore(0x80, m4) |
| 7226 | mstore(0xa0, m5) |
| 7227 | mstore(0xc0, m6) |
| 7228 | } |
| 7229 | } |
| 7230 | |
| 7231 | function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure { |
| 7232 | bytes32 m0; |
| 7233 | bytes32 m1; |
| 7234 | bytes32 m2; |
| 7235 | bytes32 m3; |
| 7236 | bytes32 m4; |
| 7237 | bytes32 m5; |
| 7238 | bytes32 m6; |
| 7239 | assembly ("memory-safe") { |
| 7240 | function writeString(pos, w) { |
| 7241 | let length := 0 |
| 7242 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7243 | mstore(pos, length) |
| 7244 | let shift := sub(256, shl(3, length)) |
| 7245 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7246 | } |
| 7247 | m0 := mload(0x00) |
| 7248 | m1 := mload(0x20) |
| 7249 | m2 := mload(0x40) |
| 7250 | m3 := mload(0x60) |
| 7251 | m4 := mload(0x80) |
| 7252 | m5 := mload(0xa0) |
| 7253 | m6 := mload(0xc0) |
| 7254 | // Selector of `log(bool,string,bool,uint256)`. |
| 7255 | mstore(0x00, 0x1606a393) |
| 7256 | mstore(0x20, p0) |
| 7257 | mstore(0x40, 0x80) |
| 7258 | mstore(0x60, p2) |
| 7259 | mstore(0x80, p3) |
| 7260 | writeString(0xa0, p1) |
| 7261 | } |
| 7262 | _sendLogPayload(0x1c, 0xc4); |
| 7263 | assembly ("memory-safe") { |
| 7264 | mstore(0x00, m0) |
| 7265 | mstore(0x20, m1) |
| 7266 | mstore(0x40, m2) |
| 7267 | mstore(0x60, m3) |
| 7268 | mstore(0x80, m4) |
| 7269 | mstore(0xa0, m5) |
| 7270 | mstore(0xc0, m6) |
| 7271 | } |
| 7272 | } |
| 7273 | |
| 7274 | function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure { |
| 7275 | bytes32 m0; |
| 7276 | bytes32 m1; |
| 7277 | bytes32 m2; |
| 7278 | bytes32 m3; |
| 7279 | bytes32 m4; |
| 7280 | bytes32 m5; |
| 7281 | bytes32 m6; |
| 7282 | bytes32 m7; |
| 7283 | bytes32 m8; |
| 7284 | assembly ("memory-safe") { |
| 7285 | function writeString(pos, w) { |
| 7286 | let length := 0 |
| 7287 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7288 | mstore(pos, length) |
| 7289 | let shift := sub(256, shl(3, length)) |
| 7290 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7291 | } |
| 7292 | m0 := mload(0x00) |
| 7293 | m1 := mload(0x20) |
| 7294 | m2 := mload(0x40) |
| 7295 | m3 := mload(0x60) |
| 7296 | m4 := mload(0x80) |
| 7297 | m5 := mload(0xa0) |
| 7298 | m6 := mload(0xc0) |
| 7299 | m7 := mload(0xe0) |
| 7300 | m8 := mload(0x100) |
| 7301 | // Selector of `log(bool,string,bool,string)`. |
| 7302 | mstore(0x00, 0x483d0416) |
| 7303 | mstore(0x20, p0) |
| 7304 | mstore(0x40, 0x80) |
| 7305 | mstore(0x60, p2) |
| 7306 | mstore(0x80, 0xc0) |
| 7307 | writeString(0xa0, p1) |
| 7308 | writeString(0xe0, p3) |
| 7309 | } |
| 7310 | _sendLogPayload(0x1c, 0x104); |
| 7311 | assembly ("memory-safe") { |
| 7312 | mstore(0x00, m0) |
| 7313 | mstore(0x20, m1) |
| 7314 | mstore(0x40, m2) |
| 7315 | mstore(0x60, m3) |
| 7316 | mstore(0x80, m4) |
| 7317 | mstore(0xa0, m5) |
| 7318 | mstore(0xc0, m6) |
| 7319 | mstore(0xe0, m7) |
| 7320 | mstore(0x100, m8) |
| 7321 | } |
| 7322 | } |
| 7323 | |
| 7324 | function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure { |
| 7325 | bytes32 m0; |
| 7326 | bytes32 m1; |
| 7327 | bytes32 m2; |
| 7328 | bytes32 m3; |
| 7329 | bytes32 m4; |
| 7330 | bytes32 m5; |
| 7331 | bytes32 m6; |
| 7332 | assembly ("memory-safe") { |
| 7333 | function writeString(pos, w) { |
| 7334 | let length := 0 |
| 7335 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7336 | mstore(pos, length) |
| 7337 | let shift := sub(256, shl(3, length)) |
| 7338 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7339 | } |
| 7340 | m0 := mload(0x00) |
| 7341 | m1 := mload(0x20) |
| 7342 | m2 := mload(0x40) |
| 7343 | m3 := mload(0x60) |
| 7344 | m4 := mload(0x80) |
| 7345 | m5 := mload(0xa0) |
| 7346 | m6 := mload(0xc0) |
| 7347 | // Selector of `log(bool,string,uint256,address)`. |
| 7348 | mstore(0x00, 0x1596a1ce) |
| 7349 | mstore(0x20, p0) |
| 7350 | mstore(0x40, 0x80) |
| 7351 | mstore(0x60, p2) |
| 7352 | mstore(0x80, p3) |
| 7353 | writeString(0xa0, p1) |
| 7354 | } |
| 7355 | _sendLogPayload(0x1c, 0xc4); |
| 7356 | assembly ("memory-safe") { |
| 7357 | mstore(0x00, m0) |
| 7358 | mstore(0x20, m1) |
| 7359 | mstore(0x40, m2) |
| 7360 | mstore(0x60, m3) |
| 7361 | mstore(0x80, m4) |
| 7362 | mstore(0xa0, m5) |
| 7363 | mstore(0xc0, m6) |
| 7364 | } |
| 7365 | } |
| 7366 | |
| 7367 | function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure { |
| 7368 | bytes32 m0; |
| 7369 | bytes32 m1; |
| 7370 | bytes32 m2; |
| 7371 | bytes32 m3; |
| 7372 | bytes32 m4; |
| 7373 | bytes32 m5; |
| 7374 | bytes32 m6; |
| 7375 | assembly ("memory-safe") { |
| 7376 | function writeString(pos, w) { |
| 7377 | let length := 0 |
| 7378 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7379 | mstore(pos, length) |
| 7380 | let shift := sub(256, shl(3, length)) |
| 7381 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7382 | } |
| 7383 | m0 := mload(0x00) |
| 7384 | m1 := mload(0x20) |
| 7385 | m2 := mload(0x40) |
| 7386 | m3 := mload(0x60) |
| 7387 | m4 := mload(0x80) |
| 7388 | m5 := mload(0xa0) |
| 7389 | m6 := mload(0xc0) |
| 7390 | // Selector of `log(bool,string,uint256,bool)`. |
| 7391 | mstore(0x00, 0x6b0e5d53) |
| 7392 | mstore(0x20, p0) |
| 7393 | mstore(0x40, 0x80) |
| 7394 | mstore(0x60, p2) |
| 7395 | mstore(0x80, p3) |
| 7396 | writeString(0xa0, p1) |
| 7397 | } |
| 7398 | _sendLogPayload(0x1c, 0xc4); |
| 7399 | assembly ("memory-safe") { |
| 7400 | mstore(0x00, m0) |
| 7401 | mstore(0x20, m1) |
| 7402 | mstore(0x40, m2) |
| 7403 | mstore(0x60, m3) |
| 7404 | mstore(0x80, m4) |
| 7405 | mstore(0xa0, m5) |
| 7406 | mstore(0xc0, m6) |
| 7407 | } |
| 7408 | } |
| 7409 | |
| 7410 | function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { |
| 7411 | bytes32 m0; |
| 7412 | bytes32 m1; |
| 7413 | bytes32 m2; |
| 7414 | bytes32 m3; |
| 7415 | bytes32 m4; |
| 7416 | bytes32 m5; |
| 7417 | bytes32 m6; |
| 7418 | assembly ("memory-safe") { |
| 7419 | function writeString(pos, w) { |
| 7420 | let length := 0 |
| 7421 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7422 | mstore(pos, length) |
| 7423 | let shift := sub(256, shl(3, length)) |
| 7424 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7425 | } |
| 7426 | m0 := mload(0x00) |
| 7427 | m1 := mload(0x20) |
| 7428 | m2 := mload(0x40) |
| 7429 | m3 := mload(0x60) |
| 7430 | m4 := mload(0x80) |
| 7431 | m5 := mload(0xa0) |
| 7432 | m6 := mload(0xc0) |
| 7433 | // Selector of `log(bool,string,uint256,uint256)`. |
| 7434 | mstore(0x00, 0x28863fcb) |
| 7435 | mstore(0x20, p0) |
| 7436 | mstore(0x40, 0x80) |
| 7437 | mstore(0x60, p2) |
| 7438 | mstore(0x80, p3) |
| 7439 | writeString(0xa0, p1) |
| 7440 | } |
| 7441 | _sendLogPayload(0x1c, 0xc4); |
| 7442 | assembly ("memory-safe") { |
| 7443 | mstore(0x00, m0) |
| 7444 | mstore(0x20, m1) |
| 7445 | mstore(0x40, m2) |
| 7446 | mstore(0x60, m3) |
| 7447 | mstore(0x80, m4) |
| 7448 | mstore(0xa0, m5) |
| 7449 | mstore(0xc0, m6) |
| 7450 | } |
| 7451 | } |
| 7452 | |
| 7453 | function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { |
| 7454 | bytes32 m0; |
| 7455 | bytes32 m1; |
| 7456 | bytes32 m2; |
| 7457 | bytes32 m3; |
| 7458 | bytes32 m4; |
| 7459 | bytes32 m5; |
| 7460 | bytes32 m6; |
| 7461 | bytes32 m7; |
| 7462 | bytes32 m8; |
| 7463 | assembly ("memory-safe") { |
| 7464 | function writeString(pos, w) { |
| 7465 | let length := 0 |
| 7466 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7467 | mstore(pos, length) |
| 7468 | let shift := sub(256, shl(3, length)) |
| 7469 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7470 | } |
| 7471 | m0 := mload(0x00) |
| 7472 | m1 := mload(0x20) |
| 7473 | m2 := mload(0x40) |
| 7474 | m3 := mload(0x60) |
| 7475 | m4 := mload(0x80) |
| 7476 | m5 := mload(0xa0) |
| 7477 | m6 := mload(0xc0) |
| 7478 | m7 := mload(0xe0) |
| 7479 | m8 := mload(0x100) |
| 7480 | // Selector of `log(bool,string,uint256,string)`. |
| 7481 | mstore(0x00, 0x1ad96de6) |
| 7482 | mstore(0x20, p0) |
| 7483 | mstore(0x40, 0x80) |
| 7484 | mstore(0x60, p2) |
| 7485 | mstore(0x80, 0xc0) |
| 7486 | writeString(0xa0, p1) |
| 7487 | writeString(0xe0, p3) |
| 7488 | } |
| 7489 | _sendLogPayload(0x1c, 0x104); |
| 7490 | assembly ("memory-safe") { |
| 7491 | mstore(0x00, m0) |
| 7492 | mstore(0x20, m1) |
| 7493 | mstore(0x40, m2) |
| 7494 | mstore(0x60, m3) |
| 7495 | mstore(0x80, m4) |
| 7496 | mstore(0xa0, m5) |
| 7497 | mstore(0xc0, m6) |
| 7498 | mstore(0xe0, m7) |
| 7499 | mstore(0x100, m8) |
| 7500 | } |
| 7501 | } |
| 7502 | |
| 7503 | function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure { |
| 7504 | bytes32 m0; |
| 7505 | bytes32 m1; |
| 7506 | bytes32 m2; |
| 7507 | bytes32 m3; |
| 7508 | bytes32 m4; |
| 7509 | bytes32 m5; |
| 7510 | bytes32 m6; |
| 7511 | bytes32 m7; |
| 7512 | bytes32 m8; |
| 7513 | assembly ("memory-safe") { |
| 7514 | function writeString(pos, w) { |
| 7515 | let length := 0 |
| 7516 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7517 | mstore(pos, length) |
| 7518 | let shift := sub(256, shl(3, length)) |
| 7519 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7520 | } |
| 7521 | m0 := mload(0x00) |
| 7522 | m1 := mload(0x20) |
| 7523 | m2 := mload(0x40) |
| 7524 | m3 := mload(0x60) |
| 7525 | m4 := mload(0x80) |
| 7526 | m5 := mload(0xa0) |
| 7527 | m6 := mload(0xc0) |
| 7528 | m7 := mload(0xe0) |
| 7529 | m8 := mload(0x100) |
| 7530 | // Selector of `log(bool,string,string,address)`. |
| 7531 | mstore(0x00, 0x97d394d8) |
| 7532 | mstore(0x20, p0) |
| 7533 | mstore(0x40, 0x80) |
| 7534 | mstore(0x60, 0xc0) |
| 7535 | mstore(0x80, p3) |
| 7536 | writeString(0xa0, p1) |
| 7537 | writeString(0xe0, p2) |
| 7538 | } |
| 7539 | _sendLogPayload(0x1c, 0x104); |
| 7540 | assembly ("memory-safe") { |
| 7541 | mstore(0x00, m0) |
| 7542 | mstore(0x20, m1) |
| 7543 | mstore(0x40, m2) |
| 7544 | mstore(0x60, m3) |
| 7545 | mstore(0x80, m4) |
| 7546 | mstore(0xa0, m5) |
| 7547 | mstore(0xc0, m6) |
| 7548 | mstore(0xe0, m7) |
| 7549 | mstore(0x100, m8) |
| 7550 | } |
| 7551 | } |
| 7552 | |
| 7553 | function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure { |
| 7554 | bytes32 m0; |
| 7555 | bytes32 m1; |
| 7556 | bytes32 m2; |
| 7557 | bytes32 m3; |
| 7558 | bytes32 m4; |
| 7559 | bytes32 m5; |
| 7560 | bytes32 m6; |
| 7561 | bytes32 m7; |
| 7562 | bytes32 m8; |
| 7563 | assembly ("memory-safe") { |
| 7564 | function writeString(pos, w) { |
| 7565 | let length := 0 |
| 7566 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7567 | mstore(pos, length) |
| 7568 | let shift := sub(256, shl(3, length)) |
| 7569 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7570 | } |
| 7571 | m0 := mload(0x00) |
| 7572 | m1 := mload(0x20) |
| 7573 | m2 := mload(0x40) |
| 7574 | m3 := mload(0x60) |
| 7575 | m4 := mload(0x80) |
| 7576 | m5 := mload(0xa0) |
| 7577 | m6 := mload(0xc0) |
| 7578 | m7 := mload(0xe0) |
| 7579 | m8 := mload(0x100) |
| 7580 | // Selector of `log(bool,string,string,bool)`. |
| 7581 | mstore(0x00, 0x1e4b87e5) |
| 7582 | mstore(0x20, p0) |
| 7583 | mstore(0x40, 0x80) |
| 7584 | mstore(0x60, 0xc0) |
| 7585 | mstore(0x80, p3) |
| 7586 | writeString(0xa0, p1) |
| 7587 | writeString(0xe0, p2) |
| 7588 | } |
| 7589 | _sendLogPayload(0x1c, 0x104); |
| 7590 | assembly ("memory-safe") { |
| 7591 | mstore(0x00, m0) |
| 7592 | mstore(0x20, m1) |
| 7593 | mstore(0x40, m2) |
| 7594 | mstore(0x60, m3) |
| 7595 | mstore(0x80, m4) |
| 7596 | mstore(0xa0, m5) |
| 7597 | mstore(0xc0, m6) |
| 7598 | mstore(0xe0, m7) |
| 7599 | mstore(0x100, m8) |
| 7600 | } |
| 7601 | } |
| 7602 | |
| 7603 | function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { |
| 7604 | bytes32 m0; |
| 7605 | bytes32 m1; |
| 7606 | bytes32 m2; |
| 7607 | bytes32 m3; |
| 7608 | bytes32 m4; |
| 7609 | bytes32 m5; |
| 7610 | bytes32 m6; |
| 7611 | bytes32 m7; |
| 7612 | bytes32 m8; |
| 7613 | assembly ("memory-safe") { |
| 7614 | function writeString(pos, w) { |
| 7615 | let length := 0 |
| 7616 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7617 | mstore(pos, length) |
| 7618 | let shift := sub(256, shl(3, length)) |
| 7619 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7620 | } |
| 7621 | m0 := mload(0x00) |
| 7622 | m1 := mload(0x20) |
| 7623 | m2 := mload(0x40) |
| 7624 | m3 := mload(0x60) |
| 7625 | m4 := mload(0x80) |
| 7626 | m5 := mload(0xa0) |
| 7627 | m6 := mload(0xc0) |
| 7628 | m7 := mload(0xe0) |
| 7629 | m8 := mload(0x100) |
| 7630 | // Selector of `log(bool,string,string,uint256)`. |
| 7631 | mstore(0x00, 0x7be0c3eb) |
| 7632 | mstore(0x20, p0) |
| 7633 | mstore(0x40, 0x80) |
| 7634 | mstore(0x60, 0xc0) |
| 7635 | mstore(0x80, p3) |
| 7636 | writeString(0xa0, p1) |
| 7637 | writeString(0xe0, p2) |
| 7638 | } |
| 7639 | _sendLogPayload(0x1c, 0x104); |
| 7640 | assembly ("memory-safe") { |
| 7641 | mstore(0x00, m0) |
| 7642 | mstore(0x20, m1) |
| 7643 | mstore(0x40, m2) |
| 7644 | mstore(0x60, m3) |
| 7645 | mstore(0x80, m4) |
| 7646 | mstore(0xa0, m5) |
| 7647 | mstore(0xc0, m6) |
| 7648 | mstore(0xe0, m7) |
| 7649 | mstore(0x100, m8) |
| 7650 | } |
| 7651 | } |
| 7652 | |
| 7653 | function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { |
| 7654 | bytes32 m0; |
| 7655 | bytes32 m1; |
| 7656 | bytes32 m2; |
| 7657 | bytes32 m3; |
| 7658 | bytes32 m4; |
| 7659 | bytes32 m5; |
| 7660 | bytes32 m6; |
| 7661 | bytes32 m7; |
| 7662 | bytes32 m8; |
| 7663 | bytes32 m9; |
| 7664 | bytes32 m10; |
| 7665 | assembly ("memory-safe") { |
| 7666 | function writeString(pos, w) { |
| 7667 | let length := 0 |
| 7668 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7669 | mstore(pos, length) |
| 7670 | let shift := sub(256, shl(3, length)) |
| 7671 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7672 | } |
| 7673 | m0 := mload(0x00) |
| 7674 | m1 := mload(0x20) |
| 7675 | m2 := mload(0x40) |
| 7676 | m3 := mload(0x60) |
| 7677 | m4 := mload(0x80) |
| 7678 | m5 := mload(0xa0) |
| 7679 | m6 := mload(0xc0) |
| 7680 | m7 := mload(0xe0) |
| 7681 | m8 := mload(0x100) |
| 7682 | m9 := mload(0x120) |
| 7683 | m10 := mload(0x140) |
| 7684 | // Selector of `log(bool,string,string,string)`. |
| 7685 | mstore(0x00, 0x1762e32a) |
| 7686 | mstore(0x20, p0) |
| 7687 | mstore(0x40, 0x80) |
| 7688 | mstore(0x60, 0xc0) |
| 7689 | mstore(0x80, 0x100) |
| 7690 | writeString(0xa0, p1) |
| 7691 | writeString(0xe0, p2) |
| 7692 | writeString(0x120, p3) |
| 7693 | } |
| 7694 | _sendLogPayload(0x1c, 0x144); |
| 7695 | assembly ("memory-safe") { |
| 7696 | mstore(0x00, m0) |
| 7697 | mstore(0x20, m1) |
| 7698 | mstore(0x40, m2) |
| 7699 | mstore(0x60, m3) |
| 7700 | mstore(0x80, m4) |
| 7701 | mstore(0xa0, m5) |
| 7702 | mstore(0xc0, m6) |
| 7703 | mstore(0xe0, m7) |
| 7704 | mstore(0x100, m8) |
| 7705 | mstore(0x120, m9) |
| 7706 | mstore(0x140, m10) |
| 7707 | } |
| 7708 | } |
| 7709 | |
| 7710 | function log(uint256 p0, address p1, address p2, address p3) internal pure { |
| 7711 | bytes32 m0; |
| 7712 | bytes32 m1; |
| 7713 | bytes32 m2; |
| 7714 | bytes32 m3; |
| 7715 | bytes32 m4; |
| 7716 | assembly ("memory-safe") { |
| 7717 | m0 := mload(0x00) |
| 7718 | m1 := mload(0x20) |
| 7719 | m2 := mload(0x40) |
| 7720 | m3 := mload(0x60) |
| 7721 | m4 := mload(0x80) |
| 7722 | // Selector of `log(uint256,address,address,address)`. |
| 7723 | mstore(0x00, 0x2488b414) |
| 7724 | mstore(0x20, p0) |
| 7725 | mstore(0x40, p1) |
| 7726 | mstore(0x60, p2) |
| 7727 | mstore(0x80, p3) |
| 7728 | } |
| 7729 | _sendLogPayload(0x1c, 0x84); |
| 7730 | assembly ("memory-safe") { |
| 7731 | mstore(0x00, m0) |
| 7732 | mstore(0x20, m1) |
| 7733 | mstore(0x40, m2) |
| 7734 | mstore(0x60, m3) |
| 7735 | mstore(0x80, m4) |
| 7736 | } |
| 7737 | } |
| 7738 | |
| 7739 | function log(uint256 p0, address p1, address p2, bool p3) internal pure { |
| 7740 | bytes32 m0; |
| 7741 | bytes32 m1; |
| 7742 | bytes32 m2; |
| 7743 | bytes32 m3; |
| 7744 | bytes32 m4; |
| 7745 | assembly ("memory-safe") { |
| 7746 | m0 := mload(0x00) |
| 7747 | m1 := mload(0x20) |
| 7748 | m2 := mload(0x40) |
| 7749 | m3 := mload(0x60) |
| 7750 | m4 := mload(0x80) |
| 7751 | // Selector of `log(uint256,address,address,bool)`. |
| 7752 | mstore(0x00, 0x091ffaf5) |
| 7753 | mstore(0x20, p0) |
| 7754 | mstore(0x40, p1) |
| 7755 | mstore(0x60, p2) |
| 7756 | mstore(0x80, p3) |
| 7757 | } |
| 7758 | _sendLogPayload(0x1c, 0x84); |
| 7759 | assembly ("memory-safe") { |
| 7760 | mstore(0x00, m0) |
| 7761 | mstore(0x20, m1) |
| 7762 | mstore(0x40, m2) |
| 7763 | mstore(0x60, m3) |
| 7764 | mstore(0x80, m4) |
| 7765 | } |
| 7766 | } |
| 7767 | |
| 7768 | function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { |
| 7769 | bytes32 m0; |
| 7770 | bytes32 m1; |
| 7771 | bytes32 m2; |
| 7772 | bytes32 m3; |
| 7773 | bytes32 m4; |
| 7774 | assembly ("memory-safe") { |
| 7775 | m0 := mload(0x00) |
| 7776 | m1 := mload(0x20) |
| 7777 | m2 := mload(0x40) |
| 7778 | m3 := mload(0x60) |
| 7779 | m4 := mload(0x80) |
| 7780 | // Selector of `log(uint256,address,address,uint256)`. |
| 7781 | mstore(0x00, 0x736efbb6) |
| 7782 | mstore(0x20, p0) |
| 7783 | mstore(0x40, p1) |
| 7784 | mstore(0x60, p2) |
| 7785 | mstore(0x80, p3) |
| 7786 | } |
| 7787 | _sendLogPayload(0x1c, 0x84); |
| 7788 | assembly ("memory-safe") { |
| 7789 | mstore(0x00, m0) |
| 7790 | mstore(0x20, m1) |
| 7791 | mstore(0x40, m2) |
| 7792 | mstore(0x60, m3) |
| 7793 | mstore(0x80, m4) |
| 7794 | } |
| 7795 | } |
| 7796 | |
| 7797 | function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure { |
| 7798 | bytes32 m0; |
| 7799 | bytes32 m1; |
| 7800 | bytes32 m2; |
| 7801 | bytes32 m3; |
| 7802 | bytes32 m4; |
| 7803 | bytes32 m5; |
| 7804 | bytes32 m6; |
| 7805 | assembly ("memory-safe") { |
| 7806 | function writeString(pos, w) { |
| 7807 | let length := 0 |
| 7808 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7809 | mstore(pos, length) |
| 7810 | let shift := sub(256, shl(3, length)) |
| 7811 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7812 | } |
| 7813 | m0 := mload(0x00) |
| 7814 | m1 := mload(0x20) |
| 7815 | m2 := mload(0x40) |
| 7816 | m3 := mload(0x60) |
| 7817 | m4 := mload(0x80) |
| 7818 | m5 := mload(0xa0) |
| 7819 | m6 := mload(0xc0) |
| 7820 | // Selector of `log(uint256,address,address,string)`. |
| 7821 | mstore(0x00, 0x031c6f73) |
| 7822 | mstore(0x20, p0) |
| 7823 | mstore(0x40, p1) |
| 7824 | mstore(0x60, p2) |
| 7825 | mstore(0x80, 0x80) |
| 7826 | writeString(0xa0, p3) |
| 7827 | } |
| 7828 | _sendLogPayload(0x1c, 0xc4); |
| 7829 | assembly ("memory-safe") { |
| 7830 | mstore(0x00, m0) |
| 7831 | mstore(0x20, m1) |
| 7832 | mstore(0x40, m2) |
| 7833 | mstore(0x60, m3) |
| 7834 | mstore(0x80, m4) |
| 7835 | mstore(0xa0, m5) |
| 7836 | mstore(0xc0, m6) |
| 7837 | } |
| 7838 | } |
| 7839 | |
| 7840 | function log(uint256 p0, address p1, bool p2, address p3) internal pure { |
| 7841 | bytes32 m0; |
| 7842 | bytes32 m1; |
| 7843 | bytes32 m2; |
| 7844 | bytes32 m3; |
| 7845 | bytes32 m4; |
| 7846 | assembly ("memory-safe") { |
| 7847 | m0 := mload(0x00) |
| 7848 | m1 := mload(0x20) |
| 7849 | m2 := mload(0x40) |
| 7850 | m3 := mload(0x60) |
| 7851 | m4 := mload(0x80) |
| 7852 | // Selector of `log(uint256,address,bool,address)`. |
| 7853 | mstore(0x00, 0xef72c513) |
| 7854 | mstore(0x20, p0) |
| 7855 | mstore(0x40, p1) |
| 7856 | mstore(0x60, p2) |
| 7857 | mstore(0x80, p3) |
| 7858 | } |
| 7859 | _sendLogPayload(0x1c, 0x84); |
| 7860 | assembly ("memory-safe") { |
| 7861 | mstore(0x00, m0) |
| 7862 | mstore(0x20, m1) |
| 7863 | mstore(0x40, m2) |
| 7864 | mstore(0x60, m3) |
| 7865 | mstore(0x80, m4) |
| 7866 | } |
| 7867 | } |
| 7868 | |
| 7869 | function log(uint256 p0, address p1, bool p2, bool p3) internal pure { |
| 7870 | bytes32 m0; |
| 7871 | bytes32 m1; |
| 7872 | bytes32 m2; |
| 7873 | bytes32 m3; |
| 7874 | bytes32 m4; |
| 7875 | assembly ("memory-safe") { |
| 7876 | m0 := mload(0x00) |
| 7877 | m1 := mload(0x20) |
| 7878 | m2 := mload(0x40) |
| 7879 | m3 := mload(0x60) |
| 7880 | m4 := mload(0x80) |
| 7881 | // Selector of `log(uint256,address,bool,bool)`. |
| 7882 | mstore(0x00, 0xe351140f) |
| 7883 | mstore(0x20, p0) |
| 7884 | mstore(0x40, p1) |
| 7885 | mstore(0x60, p2) |
| 7886 | mstore(0x80, p3) |
| 7887 | } |
| 7888 | _sendLogPayload(0x1c, 0x84); |
| 7889 | assembly ("memory-safe") { |
| 7890 | mstore(0x00, m0) |
| 7891 | mstore(0x20, m1) |
| 7892 | mstore(0x40, m2) |
| 7893 | mstore(0x60, m3) |
| 7894 | mstore(0x80, m4) |
| 7895 | } |
| 7896 | } |
| 7897 | |
| 7898 | function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { |
| 7899 | bytes32 m0; |
| 7900 | bytes32 m1; |
| 7901 | bytes32 m2; |
| 7902 | bytes32 m3; |
| 7903 | bytes32 m4; |
| 7904 | assembly ("memory-safe") { |
| 7905 | m0 := mload(0x00) |
| 7906 | m1 := mload(0x20) |
| 7907 | m2 := mload(0x40) |
| 7908 | m3 := mload(0x60) |
| 7909 | m4 := mload(0x80) |
| 7910 | // Selector of `log(uint256,address,bool,uint256)`. |
| 7911 | mstore(0x00, 0x5abd992a) |
| 7912 | mstore(0x20, p0) |
| 7913 | mstore(0x40, p1) |
| 7914 | mstore(0x60, p2) |
| 7915 | mstore(0x80, p3) |
| 7916 | } |
| 7917 | _sendLogPayload(0x1c, 0x84); |
| 7918 | assembly ("memory-safe") { |
| 7919 | mstore(0x00, m0) |
| 7920 | mstore(0x20, m1) |
| 7921 | mstore(0x40, m2) |
| 7922 | mstore(0x60, m3) |
| 7923 | mstore(0x80, m4) |
| 7924 | } |
| 7925 | } |
| 7926 | |
| 7927 | function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure { |
| 7928 | bytes32 m0; |
| 7929 | bytes32 m1; |
| 7930 | bytes32 m2; |
| 7931 | bytes32 m3; |
| 7932 | bytes32 m4; |
| 7933 | bytes32 m5; |
| 7934 | bytes32 m6; |
| 7935 | assembly ("memory-safe") { |
| 7936 | function writeString(pos, w) { |
| 7937 | let length := 0 |
| 7938 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 7939 | mstore(pos, length) |
| 7940 | let shift := sub(256, shl(3, length)) |
| 7941 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 7942 | } |
| 7943 | m0 := mload(0x00) |
| 7944 | m1 := mload(0x20) |
| 7945 | m2 := mload(0x40) |
| 7946 | m3 := mload(0x60) |
| 7947 | m4 := mload(0x80) |
| 7948 | m5 := mload(0xa0) |
| 7949 | m6 := mload(0xc0) |
| 7950 | // Selector of `log(uint256,address,bool,string)`. |
| 7951 | mstore(0x00, 0x90fb06aa) |
| 7952 | mstore(0x20, p0) |
| 7953 | mstore(0x40, p1) |
| 7954 | mstore(0x60, p2) |
| 7955 | mstore(0x80, 0x80) |
| 7956 | writeString(0xa0, p3) |
| 7957 | } |
| 7958 | _sendLogPayload(0x1c, 0xc4); |
| 7959 | assembly ("memory-safe") { |
| 7960 | mstore(0x00, m0) |
| 7961 | mstore(0x20, m1) |
| 7962 | mstore(0x40, m2) |
| 7963 | mstore(0x60, m3) |
| 7964 | mstore(0x80, m4) |
| 7965 | mstore(0xa0, m5) |
| 7966 | mstore(0xc0, m6) |
| 7967 | } |
| 7968 | } |
| 7969 | |
| 7970 | function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { |
| 7971 | bytes32 m0; |
| 7972 | bytes32 m1; |
| 7973 | bytes32 m2; |
| 7974 | bytes32 m3; |
| 7975 | bytes32 m4; |
| 7976 | assembly ("memory-safe") { |
| 7977 | m0 := mload(0x00) |
| 7978 | m1 := mload(0x20) |
| 7979 | m2 := mload(0x40) |
| 7980 | m3 := mload(0x60) |
| 7981 | m4 := mload(0x80) |
| 7982 | // Selector of `log(uint256,address,uint256,address)`. |
| 7983 | mstore(0x00, 0x15c127b5) |
| 7984 | mstore(0x20, p0) |
| 7985 | mstore(0x40, p1) |
| 7986 | mstore(0x60, p2) |
| 7987 | mstore(0x80, p3) |
| 7988 | } |
| 7989 | _sendLogPayload(0x1c, 0x84); |
| 7990 | assembly ("memory-safe") { |
| 7991 | mstore(0x00, m0) |
| 7992 | mstore(0x20, m1) |
| 7993 | mstore(0x40, m2) |
| 7994 | mstore(0x60, m3) |
| 7995 | mstore(0x80, m4) |
| 7996 | } |
| 7997 | } |
| 7998 | |
| 7999 | function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { |
| 8000 | bytes32 m0; |
| 8001 | bytes32 m1; |
| 8002 | bytes32 m2; |
| 8003 | bytes32 m3; |
| 8004 | bytes32 m4; |
| 8005 | assembly ("memory-safe") { |
| 8006 | m0 := mload(0x00) |
| 8007 | m1 := mload(0x20) |
| 8008 | m2 := mload(0x40) |
| 8009 | m3 := mload(0x60) |
| 8010 | m4 := mload(0x80) |
| 8011 | // Selector of `log(uint256,address,uint256,bool)`. |
| 8012 | mstore(0x00, 0x5f743a7c) |
| 8013 | mstore(0x20, p0) |
| 8014 | mstore(0x40, p1) |
| 8015 | mstore(0x60, p2) |
| 8016 | mstore(0x80, p3) |
| 8017 | } |
| 8018 | _sendLogPayload(0x1c, 0x84); |
| 8019 | assembly ("memory-safe") { |
| 8020 | mstore(0x00, m0) |
| 8021 | mstore(0x20, m1) |
| 8022 | mstore(0x40, m2) |
| 8023 | mstore(0x60, m3) |
| 8024 | mstore(0x80, m4) |
| 8025 | } |
| 8026 | } |
| 8027 | |
| 8028 | function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 8029 | bytes32 m0; |
| 8030 | bytes32 m1; |
| 8031 | bytes32 m2; |
| 8032 | bytes32 m3; |
| 8033 | bytes32 m4; |
| 8034 | assembly ("memory-safe") { |
| 8035 | m0 := mload(0x00) |
| 8036 | m1 := mload(0x20) |
| 8037 | m2 := mload(0x40) |
| 8038 | m3 := mload(0x60) |
| 8039 | m4 := mload(0x80) |
| 8040 | // Selector of `log(uint256,address,uint256,uint256)`. |
| 8041 | mstore(0x00, 0x0c9cd9c1) |
| 8042 | mstore(0x20, p0) |
| 8043 | mstore(0x40, p1) |
| 8044 | mstore(0x60, p2) |
| 8045 | mstore(0x80, p3) |
| 8046 | } |
| 8047 | _sendLogPayload(0x1c, 0x84); |
| 8048 | assembly ("memory-safe") { |
| 8049 | mstore(0x00, m0) |
| 8050 | mstore(0x20, m1) |
| 8051 | mstore(0x40, m2) |
| 8052 | mstore(0x60, m3) |
| 8053 | mstore(0x80, m4) |
| 8054 | } |
| 8055 | } |
| 8056 | |
| 8057 | function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure { |
| 8058 | bytes32 m0; |
| 8059 | bytes32 m1; |
| 8060 | bytes32 m2; |
| 8061 | bytes32 m3; |
| 8062 | bytes32 m4; |
| 8063 | bytes32 m5; |
| 8064 | bytes32 m6; |
| 8065 | assembly ("memory-safe") { |
| 8066 | function writeString(pos, w) { |
| 8067 | let length := 0 |
| 8068 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8069 | mstore(pos, length) |
| 8070 | let shift := sub(256, shl(3, length)) |
| 8071 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8072 | } |
| 8073 | m0 := mload(0x00) |
| 8074 | m1 := mload(0x20) |
| 8075 | m2 := mload(0x40) |
| 8076 | m3 := mload(0x60) |
| 8077 | m4 := mload(0x80) |
| 8078 | m5 := mload(0xa0) |
| 8079 | m6 := mload(0xc0) |
| 8080 | // Selector of `log(uint256,address,uint256,string)`. |
| 8081 | mstore(0x00, 0xddb06521) |
| 8082 | mstore(0x20, p0) |
| 8083 | mstore(0x40, p1) |
| 8084 | mstore(0x60, p2) |
| 8085 | mstore(0x80, 0x80) |
| 8086 | writeString(0xa0, p3) |
| 8087 | } |
| 8088 | _sendLogPayload(0x1c, 0xc4); |
| 8089 | assembly ("memory-safe") { |
| 8090 | mstore(0x00, m0) |
| 8091 | mstore(0x20, m1) |
| 8092 | mstore(0x40, m2) |
| 8093 | mstore(0x60, m3) |
| 8094 | mstore(0x80, m4) |
| 8095 | mstore(0xa0, m5) |
| 8096 | mstore(0xc0, m6) |
| 8097 | } |
| 8098 | } |
| 8099 | |
| 8100 | function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure { |
| 8101 | bytes32 m0; |
| 8102 | bytes32 m1; |
| 8103 | bytes32 m2; |
| 8104 | bytes32 m3; |
| 8105 | bytes32 m4; |
| 8106 | bytes32 m5; |
| 8107 | bytes32 m6; |
| 8108 | assembly ("memory-safe") { |
| 8109 | function writeString(pos, w) { |
| 8110 | let length := 0 |
| 8111 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8112 | mstore(pos, length) |
| 8113 | let shift := sub(256, shl(3, length)) |
| 8114 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8115 | } |
| 8116 | m0 := mload(0x00) |
| 8117 | m1 := mload(0x20) |
| 8118 | m2 := mload(0x40) |
| 8119 | m3 := mload(0x60) |
| 8120 | m4 := mload(0x80) |
| 8121 | m5 := mload(0xa0) |
| 8122 | m6 := mload(0xc0) |
| 8123 | // Selector of `log(uint256,address,string,address)`. |
| 8124 | mstore(0x00, 0x9cba8fff) |
| 8125 | mstore(0x20, p0) |
| 8126 | mstore(0x40, p1) |
| 8127 | mstore(0x60, 0x80) |
| 8128 | mstore(0x80, p3) |
| 8129 | writeString(0xa0, p2) |
| 8130 | } |
| 8131 | _sendLogPayload(0x1c, 0xc4); |
| 8132 | assembly ("memory-safe") { |
| 8133 | mstore(0x00, m0) |
| 8134 | mstore(0x20, m1) |
| 8135 | mstore(0x40, m2) |
| 8136 | mstore(0x60, m3) |
| 8137 | mstore(0x80, m4) |
| 8138 | mstore(0xa0, m5) |
| 8139 | mstore(0xc0, m6) |
| 8140 | } |
| 8141 | } |
| 8142 | |
| 8143 | function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure { |
| 8144 | bytes32 m0; |
| 8145 | bytes32 m1; |
| 8146 | bytes32 m2; |
| 8147 | bytes32 m3; |
| 8148 | bytes32 m4; |
| 8149 | bytes32 m5; |
| 8150 | bytes32 m6; |
| 8151 | assembly ("memory-safe") { |
| 8152 | function writeString(pos, w) { |
| 8153 | let length := 0 |
| 8154 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8155 | mstore(pos, length) |
| 8156 | let shift := sub(256, shl(3, length)) |
| 8157 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8158 | } |
| 8159 | m0 := mload(0x00) |
| 8160 | m1 := mload(0x20) |
| 8161 | m2 := mload(0x40) |
| 8162 | m3 := mload(0x60) |
| 8163 | m4 := mload(0x80) |
| 8164 | m5 := mload(0xa0) |
| 8165 | m6 := mload(0xc0) |
| 8166 | // Selector of `log(uint256,address,string,bool)`. |
| 8167 | mstore(0x00, 0xcc32ab07) |
| 8168 | mstore(0x20, p0) |
| 8169 | mstore(0x40, p1) |
| 8170 | mstore(0x60, 0x80) |
| 8171 | mstore(0x80, p3) |
| 8172 | writeString(0xa0, p2) |
| 8173 | } |
| 8174 | _sendLogPayload(0x1c, 0xc4); |
| 8175 | assembly ("memory-safe") { |
| 8176 | mstore(0x00, m0) |
| 8177 | mstore(0x20, m1) |
| 8178 | mstore(0x40, m2) |
| 8179 | mstore(0x60, m3) |
| 8180 | mstore(0x80, m4) |
| 8181 | mstore(0xa0, m5) |
| 8182 | mstore(0xc0, m6) |
| 8183 | } |
| 8184 | } |
| 8185 | |
| 8186 | function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure { |
| 8187 | bytes32 m0; |
| 8188 | bytes32 m1; |
| 8189 | bytes32 m2; |
| 8190 | bytes32 m3; |
| 8191 | bytes32 m4; |
| 8192 | bytes32 m5; |
| 8193 | bytes32 m6; |
| 8194 | assembly ("memory-safe") { |
| 8195 | function writeString(pos, w) { |
| 8196 | let length := 0 |
| 8197 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8198 | mstore(pos, length) |
| 8199 | let shift := sub(256, shl(3, length)) |
| 8200 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8201 | } |
| 8202 | m0 := mload(0x00) |
| 8203 | m1 := mload(0x20) |
| 8204 | m2 := mload(0x40) |
| 8205 | m3 := mload(0x60) |
| 8206 | m4 := mload(0x80) |
| 8207 | m5 := mload(0xa0) |
| 8208 | m6 := mload(0xc0) |
| 8209 | // Selector of `log(uint256,address,string,uint256)`. |
| 8210 | mstore(0x00, 0x46826b5d) |
| 8211 | mstore(0x20, p0) |
| 8212 | mstore(0x40, p1) |
| 8213 | mstore(0x60, 0x80) |
| 8214 | mstore(0x80, p3) |
| 8215 | writeString(0xa0, p2) |
| 8216 | } |
| 8217 | _sendLogPayload(0x1c, 0xc4); |
| 8218 | assembly ("memory-safe") { |
| 8219 | mstore(0x00, m0) |
| 8220 | mstore(0x20, m1) |
| 8221 | mstore(0x40, m2) |
| 8222 | mstore(0x60, m3) |
| 8223 | mstore(0x80, m4) |
| 8224 | mstore(0xa0, m5) |
| 8225 | mstore(0xc0, m6) |
| 8226 | } |
| 8227 | } |
| 8228 | |
| 8229 | function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure { |
| 8230 | bytes32 m0; |
| 8231 | bytes32 m1; |
| 8232 | bytes32 m2; |
| 8233 | bytes32 m3; |
| 8234 | bytes32 m4; |
| 8235 | bytes32 m5; |
| 8236 | bytes32 m6; |
| 8237 | bytes32 m7; |
| 8238 | bytes32 m8; |
| 8239 | assembly ("memory-safe") { |
| 8240 | function writeString(pos, w) { |
| 8241 | let length := 0 |
| 8242 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8243 | mstore(pos, length) |
| 8244 | let shift := sub(256, shl(3, length)) |
| 8245 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8246 | } |
| 8247 | m0 := mload(0x00) |
| 8248 | m1 := mload(0x20) |
| 8249 | m2 := mload(0x40) |
| 8250 | m3 := mload(0x60) |
| 8251 | m4 := mload(0x80) |
| 8252 | m5 := mload(0xa0) |
| 8253 | m6 := mload(0xc0) |
| 8254 | m7 := mload(0xe0) |
| 8255 | m8 := mload(0x100) |
| 8256 | // Selector of `log(uint256,address,string,string)`. |
| 8257 | mstore(0x00, 0x3e128ca3) |
| 8258 | mstore(0x20, p0) |
| 8259 | mstore(0x40, p1) |
| 8260 | mstore(0x60, 0x80) |
| 8261 | mstore(0x80, 0xc0) |
| 8262 | writeString(0xa0, p2) |
| 8263 | writeString(0xe0, p3) |
| 8264 | } |
| 8265 | _sendLogPayload(0x1c, 0x104); |
| 8266 | assembly ("memory-safe") { |
| 8267 | mstore(0x00, m0) |
| 8268 | mstore(0x20, m1) |
| 8269 | mstore(0x40, m2) |
| 8270 | mstore(0x60, m3) |
| 8271 | mstore(0x80, m4) |
| 8272 | mstore(0xa0, m5) |
| 8273 | mstore(0xc0, m6) |
| 8274 | mstore(0xe0, m7) |
| 8275 | mstore(0x100, m8) |
| 8276 | } |
| 8277 | } |
| 8278 | |
| 8279 | function log(uint256 p0, bool p1, address p2, address p3) internal pure { |
| 8280 | bytes32 m0; |
| 8281 | bytes32 m1; |
| 8282 | bytes32 m2; |
| 8283 | bytes32 m3; |
| 8284 | bytes32 m4; |
| 8285 | assembly ("memory-safe") { |
| 8286 | m0 := mload(0x00) |
| 8287 | m1 := mload(0x20) |
| 8288 | m2 := mload(0x40) |
| 8289 | m3 := mload(0x60) |
| 8290 | m4 := mload(0x80) |
| 8291 | // Selector of `log(uint256,bool,address,address)`. |
| 8292 | mstore(0x00, 0xa1ef4cbb) |
| 8293 | mstore(0x20, p0) |
| 8294 | mstore(0x40, p1) |
| 8295 | mstore(0x60, p2) |
| 8296 | mstore(0x80, p3) |
| 8297 | } |
| 8298 | _sendLogPayload(0x1c, 0x84); |
| 8299 | assembly ("memory-safe") { |
| 8300 | mstore(0x00, m0) |
| 8301 | mstore(0x20, m1) |
| 8302 | mstore(0x40, m2) |
| 8303 | mstore(0x60, m3) |
| 8304 | mstore(0x80, m4) |
| 8305 | } |
| 8306 | } |
| 8307 | |
| 8308 | function log(uint256 p0, bool p1, address p2, bool p3) internal pure { |
| 8309 | bytes32 m0; |
| 8310 | bytes32 m1; |
| 8311 | bytes32 m2; |
| 8312 | bytes32 m3; |
| 8313 | bytes32 m4; |
| 8314 | assembly ("memory-safe") { |
| 8315 | m0 := mload(0x00) |
| 8316 | m1 := mload(0x20) |
| 8317 | m2 := mload(0x40) |
| 8318 | m3 := mload(0x60) |
| 8319 | m4 := mload(0x80) |
| 8320 | // Selector of `log(uint256,bool,address,bool)`. |
| 8321 | mstore(0x00, 0x454d54a5) |
| 8322 | mstore(0x20, p0) |
| 8323 | mstore(0x40, p1) |
| 8324 | mstore(0x60, p2) |
| 8325 | mstore(0x80, p3) |
| 8326 | } |
| 8327 | _sendLogPayload(0x1c, 0x84); |
| 8328 | assembly ("memory-safe") { |
| 8329 | mstore(0x00, m0) |
| 8330 | mstore(0x20, m1) |
| 8331 | mstore(0x40, m2) |
| 8332 | mstore(0x60, m3) |
| 8333 | mstore(0x80, m4) |
| 8334 | } |
| 8335 | } |
| 8336 | |
| 8337 | function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { |
| 8338 | bytes32 m0; |
| 8339 | bytes32 m1; |
| 8340 | bytes32 m2; |
| 8341 | bytes32 m3; |
| 8342 | bytes32 m4; |
| 8343 | assembly ("memory-safe") { |
| 8344 | m0 := mload(0x00) |
| 8345 | m1 := mload(0x20) |
| 8346 | m2 := mload(0x40) |
| 8347 | m3 := mload(0x60) |
| 8348 | m4 := mload(0x80) |
| 8349 | // Selector of `log(uint256,bool,address,uint256)`. |
| 8350 | mstore(0x00, 0x078287f5) |
| 8351 | mstore(0x20, p0) |
| 8352 | mstore(0x40, p1) |
| 8353 | mstore(0x60, p2) |
| 8354 | mstore(0x80, p3) |
| 8355 | } |
| 8356 | _sendLogPayload(0x1c, 0x84); |
| 8357 | assembly ("memory-safe") { |
| 8358 | mstore(0x00, m0) |
| 8359 | mstore(0x20, m1) |
| 8360 | mstore(0x40, m2) |
| 8361 | mstore(0x60, m3) |
| 8362 | mstore(0x80, m4) |
| 8363 | } |
| 8364 | } |
| 8365 | |
| 8366 | function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure { |
| 8367 | bytes32 m0; |
| 8368 | bytes32 m1; |
| 8369 | bytes32 m2; |
| 8370 | bytes32 m3; |
| 8371 | bytes32 m4; |
| 8372 | bytes32 m5; |
| 8373 | bytes32 m6; |
| 8374 | assembly ("memory-safe") { |
| 8375 | function writeString(pos, w) { |
| 8376 | let length := 0 |
| 8377 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8378 | mstore(pos, length) |
| 8379 | let shift := sub(256, shl(3, length)) |
| 8380 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8381 | } |
| 8382 | m0 := mload(0x00) |
| 8383 | m1 := mload(0x20) |
| 8384 | m2 := mload(0x40) |
| 8385 | m3 := mload(0x60) |
| 8386 | m4 := mload(0x80) |
| 8387 | m5 := mload(0xa0) |
| 8388 | m6 := mload(0xc0) |
| 8389 | // Selector of `log(uint256,bool,address,string)`. |
| 8390 | mstore(0x00, 0xade052c7) |
| 8391 | mstore(0x20, p0) |
| 8392 | mstore(0x40, p1) |
| 8393 | mstore(0x60, p2) |
| 8394 | mstore(0x80, 0x80) |
| 8395 | writeString(0xa0, p3) |
| 8396 | } |
| 8397 | _sendLogPayload(0x1c, 0xc4); |
| 8398 | assembly ("memory-safe") { |
| 8399 | mstore(0x00, m0) |
| 8400 | mstore(0x20, m1) |
| 8401 | mstore(0x40, m2) |
| 8402 | mstore(0x60, m3) |
| 8403 | mstore(0x80, m4) |
| 8404 | mstore(0xa0, m5) |
| 8405 | mstore(0xc0, m6) |
| 8406 | } |
| 8407 | } |
| 8408 | |
| 8409 | function log(uint256 p0, bool p1, bool p2, address p3) internal pure { |
| 8410 | bytes32 m0; |
| 8411 | bytes32 m1; |
| 8412 | bytes32 m2; |
| 8413 | bytes32 m3; |
| 8414 | bytes32 m4; |
| 8415 | assembly ("memory-safe") { |
| 8416 | m0 := mload(0x00) |
| 8417 | m1 := mload(0x20) |
| 8418 | m2 := mload(0x40) |
| 8419 | m3 := mload(0x60) |
| 8420 | m4 := mload(0x80) |
| 8421 | // Selector of `log(uint256,bool,bool,address)`. |
| 8422 | mstore(0x00, 0x69640b59) |
| 8423 | mstore(0x20, p0) |
| 8424 | mstore(0x40, p1) |
| 8425 | mstore(0x60, p2) |
| 8426 | mstore(0x80, p3) |
| 8427 | } |
| 8428 | _sendLogPayload(0x1c, 0x84); |
| 8429 | assembly ("memory-safe") { |
| 8430 | mstore(0x00, m0) |
| 8431 | mstore(0x20, m1) |
| 8432 | mstore(0x40, m2) |
| 8433 | mstore(0x60, m3) |
| 8434 | mstore(0x80, m4) |
| 8435 | } |
| 8436 | } |
| 8437 | |
| 8438 | function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { |
| 8439 | bytes32 m0; |
| 8440 | bytes32 m1; |
| 8441 | bytes32 m2; |
| 8442 | bytes32 m3; |
| 8443 | bytes32 m4; |
| 8444 | assembly ("memory-safe") { |
| 8445 | m0 := mload(0x00) |
| 8446 | m1 := mload(0x20) |
| 8447 | m2 := mload(0x40) |
| 8448 | m3 := mload(0x60) |
| 8449 | m4 := mload(0x80) |
| 8450 | // Selector of `log(uint256,bool,bool,bool)`. |
| 8451 | mstore(0x00, 0xb6f577a1) |
| 8452 | mstore(0x20, p0) |
| 8453 | mstore(0x40, p1) |
| 8454 | mstore(0x60, p2) |
| 8455 | mstore(0x80, p3) |
| 8456 | } |
| 8457 | _sendLogPayload(0x1c, 0x84); |
| 8458 | assembly ("memory-safe") { |
| 8459 | mstore(0x00, m0) |
| 8460 | mstore(0x20, m1) |
| 8461 | mstore(0x40, m2) |
| 8462 | mstore(0x60, m3) |
| 8463 | mstore(0x80, m4) |
| 8464 | } |
| 8465 | } |
| 8466 | |
| 8467 | function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { |
| 8468 | bytes32 m0; |
| 8469 | bytes32 m1; |
| 8470 | bytes32 m2; |
| 8471 | bytes32 m3; |
| 8472 | bytes32 m4; |
| 8473 | assembly ("memory-safe") { |
| 8474 | m0 := mload(0x00) |
| 8475 | m1 := mload(0x20) |
| 8476 | m2 := mload(0x40) |
| 8477 | m3 := mload(0x60) |
| 8478 | m4 := mload(0x80) |
| 8479 | // Selector of `log(uint256,bool,bool,uint256)`. |
| 8480 | mstore(0x00, 0x7464ce23) |
| 8481 | mstore(0x20, p0) |
| 8482 | mstore(0x40, p1) |
| 8483 | mstore(0x60, p2) |
| 8484 | mstore(0x80, p3) |
| 8485 | } |
| 8486 | _sendLogPayload(0x1c, 0x84); |
| 8487 | assembly ("memory-safe") { |
| 8488 | mstore(0x00, m0) |
| 8489 | mstore(0x20, m1) |
| 8490 | mstore(0x40, m2) |
| 8491 | mstore(0x60, m3) |
| 8492 | mstore(0x80, m4) |
| 8493 | } |
| 8494 | } |
| 8495 | |
| 8496 | function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure { |
| 8497 | bytes32 m0; |
| 8498 | bytes32 m1; |
| 8499 | bytes32 m2; |
| 8500 | bytes32 m3; |
| 8501 | bytes32 m4; |
| 8502 | bytes32 m5; |
| 8503 | bytes32 m6; |
| 8504 | assembly ("memory-safe") { |
| 8505 | function writeString(pos, w) { |
| 8506 | let length := 0 |
| 8507 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8508 | mstore(pos, length) |
| 8509 | let shift := sub(256, shl(3, length)) |
| 8510 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8511 | } |
| 8512 | m0 := mload(0x00) |
| 8513 | m1 := mload(0x20) |
| 8514 | m2 := mload(0x40) |
| 8515 | m3 := mload(0x60) |
| 8516 | m4 := mload(0x80) |
| 8517 | m5 := mload(0xa0) |
| 8518 | m6 := mload(0xc0) |
| 8519 | // Selector of `log(uint256,bool,bool,string)`. |
| 8520 | mstore(0x00, 0xdddb9561) |
| 8521 | mstore(0x20, p0) |
| 8522 | mstore(0x40, p1) |
| 8523 | mstore(0x60, p2) |
| 8524 | mstore(0x80, 0x80) |
| 8525 | writeString(0xa0, p3) |
| 8526 | } |
| 8527 | _sendLogPayload(0x1c, 0xc4); |
| 8528 | assembly ("memory-safe") { |
| 8529 | mstore(0x00, m0) |
| 8530 | mstore(0x20, m1) |
| 8531 | mstore(0x40, m2) |
| 8532 | mstore(0x60, m3) |
| 8533 | mstore(0x80, m4) |
| 8534 | mstore(0xa0, m5) |
| 8535 | mstore(0xc0, m6) |
| 8536 | } |
| 8537 | } |
| 8538 | |
| 8539 | function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { |
| 8540 | bytes32 m0; |
| 8541 | bytes32 m1; |
| 8542 | bytes32 m2; |
| 8543 | bytes32 m3; |
| 8544 | bytes32 m4; |
| 8545 | assembly ("memory-safe") { |
| 8546 | m0 := mload(0x00) |
| 8547 | m1 := mload(0x20) |
| 8548 | m2 := mload(0x40) |
| 8549 | m3 := mload(0x60) |
| 8550 | m4 := mload(0x80) |
| 8551 | // Selector of `log(uint256,bool,uint256,address)`. |
| 8552 | mstore(0x00, 0x88cb6041) |
| 8553 | mstore(0x20, p0) |
| 8554 | mstore(0x40, p1) |
| 8555 | mstore(0x60, p2) |
| 8556 | mstore(0x80, p3) |
| 8557 | } |
| 8558 | _sendLogPayload(0x1c, 0x84); |
| 8559 | assembly ("memory-safe") { |
| 8560 | mstore(0x00, m0) |
| 8561 | mstore(0x20, m1) |
| 8562 | mstore(0x40, m2) |
| 8563 | mstore(0x60, m3) |
| 8564 | mstore(0x80, m4) |
| 8565 | } |
| 8566 | } |
| 8567 | |
| 8568 | function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { |
| 8569 | bytes32 m0; |
| 8570 | bytes32 m1; |
| 8571 | bytes32 m2; |
| 8572 | bytes32 m3; |
| 8573 | bytes32 m4; |
| 8574 | assembly ("memory-safe") { |
| 8575 | m0 := mload(0x00) |
| 8576 | m1 := mload(0x20) |
| 8577 | m2 := mload(0x40) |
| 8578 | m3 := mload(0x60) |
| 8579 | m4 := mload(0x80) |
| 8580 | // Selector of `log(uint256,bool,uint256,bool)`. |
| 8581 | mstore(0x00, 0x91a02e2a) |
| 8582 | mstore(0x20, p0) |
| 8583 | mstore(0x40, p1) |
| 8584 | mstore(0x60, p2) |
| 8585 | mstore(0x80, p3) |
| 8586 | } |
| 8587 | _sendLogPayload(0x1c, 0x84); |
| 8588 | assembly ("memory-safe") { |
| 8589 | mstore(0x00, m0) |
| 8590 | mstore(0x20, m1) |
| 8591 | mstore(0x40, m2) |
| 8592 | mstore(0x60, m3) |
| 8593 | mstore(0x80, m4) |
| 8594 | } |
| 8595 | } |
| 8596 | |
| 8597 | function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 8598 | bytes32 m0; |
| 8599 | bytes32 m1; |
| 8600 | bytes32 m2; |
| 8601 | bytes32 m3; |
| 8602 | bytes32 m4; |
| 8603 | assembly ("memory-safe") { |
| 8604 | m0 := mload(0x00) |
| 8605 | m1 := mload(0x20) |
| 8606 | m2 := mload(0x40) |
| 8607 | m3 := mload(0x60) |
| 8608 | m4 := mload(0x80) |
| 8609 | // Selector of `log(uint256,bool,uint256,uint256)`. |
| 8610 | mstore(0x00, 0xc6acc7a8) |
| 8611 | mstore(0x20, p0) |
| 8612 | mstore(0x40, p1) |
| 8613 | mstore(0x60, p2) |
| 8614 | mstore(0x80, p3) |
| 8615 | } |
| 8616 | _sendLogPayload(0x1c, 0x84); |
| 8617 | assembly ("memory-safe") { |
| 8618 | mstore(0x00, m0) |
| 8619 | mstore(0x20, m1) |
| 8620 | mstore(0x40, m2) |
| 8621 | mstore(0x60, m3) |
| 8622 | mstore(0x80, m4) |
| 8623 | } |
| 8624 | } |
| 8625 | |
| 8626 | function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure { |
| 8627 | bytes32 m0; |
| 8628 | bytes32 m1; |
| 8629 | bytes32 m2; |
| 8630 | bytes32 m3; |
| 8631 | bytes32 m4; |
| 8632 | bytes32 m5; |
| 8633 | bytes32 m6; |
| 8634 | assembly ("memory-safe") { |
| 8635 | function writeString(pos, w) { |
| 8636 | let length := 0 |
| 8637 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8638 | mstore(pos, length) |
| 8639 | let shift := sub(256, shl(3, length)) |
| 8640 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8641 | } |
| 8642 | m0 := mload(0x00) |
| 8643 | m1 := mload(0x20) |
| 8644 | m2 := mload(0x40) |
| 8645 | m3 := mload(0x60) |
| 8646 | m4 := mload(0x80) |
| 8647 | m5 := mload(0xa0) |
| 8648 | m6 := mload(0xc0) |
| 8649 | // Selector of `log(uint256,bool,uint256,string)`. |
| 8650 | mstore(0x00, 0xde03e774) |
| 8651 | mstore(0x20, p0) |
| 8652 | mstore(0x40, p1) |
| 8653 | mstore(0x60, p2) |
| 8654 | mstore(0x80, 0x80) |
| 8655 | writeString(0xa0, p3) |
| 8656 | } |
| 8657 | _sendLogPayload(0x1c, 0xc4); |
| 8658 | assembly ("memory-safe") { |
| 8659 | mstore(0x00, m0) |
| 8660 | mstore(0x20, m1) |
| 8661 | mstore(0x40, m2) |
| 8662 | mstore(0x60, m3) |
| 8663 | mstore(0x80, m4) |
| 8664 | mstore(0xa0, m5) |
| 8665 | mstore(0xc0, m6) |
| 8666 | } |
| 8667 | } |
| 8668 | |
| 8669 | function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure { |
| 8670 | bytes32 m0; |
| 8671 | bytes32 m1; |
| 8672 | bytes32 m2; |
| 8673 | bytes32 m3; |
| 8674 | bytes32 m4; |
| 8675 | bytes32 m5; |
| 8676 | bytes32 m6; |
| 8677 | assembly ("memory-safe") { |
| 8678 | function writeString(pos, w) { |
| 8679 | let length := 0 |
| 8680 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8681 | mstore(pos, length) |
| 8682 | let shift := sub(256, shl(3, length)) |
| 8683 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8684 | } |
| 8685 | m0 := mload(0x00) |
| 8686 | m1 := mload(0x20) |
| 8687 | m2 := mload(0x40) |
| 8688 | m3 := mload(0x60) |
| 8689 | m4 := mload(0x80) |
| 8690 | m5 := mload(0xa0) |
| 8691 | m6 := mload(0xc0) |
| 8692 | // Selector of `log(uint256,bool,string,address)`. |
| 8693 | mstore(0x00, 0xef529018) |
| 8694 | mstore(0x20, p0) |
| 8695 | mstore(0x40, p1) |
| 8696 | mstore(0x60, 0x80) |
| 8697 | mstore(0x80, p3) |
| 8698 | writeString(0xa0, p2) |
| 8699 | } |
| 8700 | _sendLogPayload(0x1c, 0xc4); |
| 8701 | assembly ("memory-safe") { |
| 8702 | mstore(0x00, m0) |
| 8703 | mstore(0x20, m1) |
| 8704 | mstore(0x40, m2) |
| 8705 | mstore(0x60, m3) |
| 8706 | mstore(0x80, m4) |
| 8707 | mstore(0xa0, m5) |
| 8708 | mstore(0xc0, m6) |
| 8709 | } |
| 8710 | } |
| 8711 | |
| 8712 | function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure { |
| 8713 | bytes32 m0; |
| 8714 | bytes32 m1; |
| 8715 | bytes32 m2; |
| 8716 | bytes32 m3; |
| 8717 | bytes32 m4; |
| 8718 | bytes32 m5; |
| 8719 | bytes32 m6; |
| 8720 | assembly ("memory-safe") { |
| 8721 | function writeString(pos, w) { |
| 8722 | let length := 0 |
| 8723 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8724 | mstore(pos, length) |
| 8725 | let shift := sub(256, shl(3, length)) |
| 8726 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8727 | } |
| 8728 | m0 := mload(0x00) |
| 8729 | m1 := mload(0x20) |
| 8730 | m2 := mload(0x40) |
| 8731 | m3 := mload(0x60) |
| 8732 | m4 := mload(0x80) |
| 8733 | m5 := mload(0xa0) |
| 8734 | m6 := mload(0xc0) |
| 8735 | // Selector of `log(uint256,bool,string,bool)`. |
| 8736 | mstore(0x00, 0xeb928d7f) |
| 8737 | mstore(0x20, p0) |
| 8738 | mstore(0x40, p1) |
| 8739 | mstore(0x60, 0x80) |
| 8740 | mstore(0x80, p3) |
| 8741 | writeString(0xa0, p2) |
| 8742 | } |
| 8743 | _sendLogPayload(0x1c, 0xc4); |
| 8744 | assembly ("memory-safe") { |
| 8745 | mstore(0x00, m0) |
| 8746 | mstore(0x20, m1) |
| 8747 | mstore(0x40, m2) |
| 8748 | mstore(0x60, m3) |
| 8749 | mstore(0x80, m4) |
| 8750 | mstore(0xa0, m5) |
| 8751 | mstore(0xc0, m6) |
| 8752 | } |
| 8753 | } |
| 8754 | |
| 8755 | function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure { |
| 8756 | bytes32 m0; |
| 8757 | bytes32 m1; |
| 8758 | bytes32 m2; |
| 8759 | bytes32 m3; |
| 8760 | bytes32 m4; |
| 8761 | bytes32 m5; |
| 8762 | bytes32 m6; |
| 8763 | assembly ("memory-safe") { |
| 8764 | function writeString(pos, w) { |
| 8765 | let length := 0 |
| 8766 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8767 | mstore(pos, length) |
| 8768 | let shift := sub(256, shl(3, length)) |
| 8769 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8770 | } |
| 8771 | m0 := mload(0x00) |
| 8772 | m1 := mload(0x20) |
| 8773 | m2 := mload(0x40) |
| 8774 | m3 := mload(0x60) |
| 8775 | m4 := mload(0x80) |
| 8776 | m5 := mload(0xa0) |
| 8777 | m6 := mload(0xc0) |
| 8778 | // Selector of `log(uint256,bool,string,uint256)`. |
| 8779 | mstore(0x00, 0x2c1d0746) |
| 8780 | mstore(0x20, p0) |
| 8781 | mstore(0x40, p1) |
| 8782 | mstore(0x60, 0x80) |
| 8783 | mstore(0x80, p3) |
| 8784 | writeString(0xa0, p2) |
| 8785 | } |
| 8786 | _sendLogPayload(0x1c, 0xc4); |
| 8787 | assembly ("memory-safe") { |
| 8788 | mstore(0x00, m0) |
| 8789 | mstore(0x20, m1) |
| 8790 | mstore(0x40, m2) |
| 8791 | mstore(0x60, m3) |
| 8792 | mstore(0x80, m4) |
| 8793 | mstore(0xa0, m5) |
| 8794 | mstore(0xc0, m6) |
| 8795 | } |
| 8796 | } |
| 8797 | |
| 8798 | function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { |
| 8799 | bytes32 m0; |
| 8800 | bytes32 m1; |
| 8801 | bytes32 m2; |
| 8802 | bytes32 m3; |
| 8803 | bytes32 m4; |
| 8804 | bytes32 m5; |
| 8805 | bytes32 m6; |
| 8806 | bytes32 m7; |
| 8807 | bytes32 m8; |
| 8808 | assembly ("memory-safe") { |
| 8809 | function writeString(pos, w) { |
| 8810 | let length := 0 |
| 8811 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8812 | mstore(pos, length) |
| 8813 | let shift := sub(256, shl(3, length)) |
| 8814 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8815 | } |
| 8816 | m0 := mload(0x00) |
| 8817 | m1 := mload(0x20) |
| 8818 | m2 := mload(0x40) |
| 8819 | m3 := mload(0x60) |
| 8820 | m4 := mload(0x80) |
| 8821 | m5 := mload(0xa0) |
| 8822 | m6 := mload(0xc0) |
| 8823 | m7 := mload(0xe0) |
| 8824 | m8 := mload(0x100) |
| 8825 | // Selector of `log(uint256,bool,string,string)`. |
| 8826 | mstore(0x00, 0x68c8b8bd) |
| 8827 | mstore(0x20, p0) |
| 8828 | mstore(0x40, p1) |
| 8829 | mstore(0x60, 0x80) |
| 8830 | mstore(0x80, 0xc0) |
| 8831 | writeString(0xa0, p2) |
| 8832 | writeString(0xe0, p3) |
| 8833 | } |
| 8834 | _sendLogPayload(0x1c, 0x104); |
| 8835 | assembly ("memory-safe") { |
| 8836 | mstore(0x00, m0) |
| 8837 | mstore(0x20, m1) |
| 8838 | mstore(0x40, m2) |
| 8839 | mstore(0x60, m3) |
| 8840 | mstore(0x80, m4) |
| 8841 | mstore(0xa0, m5) |
| 8842 | mstore(0xc0, m6) |
| 8843 | mstore(0xe0, m7) |
| 8844 | mstore(0x100, m8) |
| 8845 | } |
| 8846 | } |
| 8847 | |
| 8848 | function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { |
| 8849 | bytes32 m0; |
| 8850 | bytes32 m1; |
| 8851 | bytes32 m2; |
| 8852 | bytes32 m3; |
| 8853 | bytes32 m4; |
| 8854 | assembly ("memory-safe") { |
| 8855 | m0 := mload(0x00) |
| 8856 | m1 := mload(0x20) |
| 8857 | m2 := mload(0x40) |
| 8858 | m3 := mload(0x60) |
| 8859 | m4 := mload(0x80) |
| 8860 | // Selector of `log(uint256,uint256,address,address)`. |
| 8861 | mstore(0x00, 0x56a5d1b1) |
| 8862 | mstore(0x20, p0) |
| 8863 | mstore(0x40, p1) |
| 8864 | mstore(0x60, p2) |
| 8865 | mstore(0x80, p3) |
| 8866 | } |
| 8867 | _sendLogPayload(0x1c, 0x84); |
| 8868 | assembly ("memory-safe") { |
| 8869 | mstore(0x00, m0) |
| 8870 | mstore(0x20, m1) |
| 8871 | mstore(0x40, m2) |
| 8872 | mstore(0x60, m3) |
| 8873 | mstore(0x80, m4) |
| 8874 | } |
| 8875 | } |
| 8876 | |
| 8877 | function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { |
| 8878 | bytes32 m0; |
| 8879 | bytes32 m1; |
| 8880 | bytes32 m2; |
| 8881 | bytes32 m3; |
| 8882 | bytes32 m4; |
| 8883 | assembly ("memory-safe") { |
| 8884 | m0 := mload(0x00) |
| 8885 | m1 := mload(0x20) |
| 8886 | m2 := mload(0x40) |
| 8887 | m3 := mload(0x60) |
| 8888 | m4 := mload(0x80) |
| 8889 | // Selector of `log(uint256,uint256,address,bool)`. |
| 8890 | mstore(0x00, 0x15cac476) |
| 8891 | mstore(0x20, p0) |
| 8892 | mstore(0x40, p1) |
| 8893 | mstore(0x60, p2) |
| 8894 | mstore(0x80, p3) |
| 8895 | } |
| 8896 | _sendLogPayload(0x1c, 0x84); |
| 8897 | assembly ("memory-safe") { |
| 8898 | mstore(0x00, m0) |
| 8899 | mstore(0x20, m1) |
| 8900 | mstore(0x40, m2) |
| 8901 | mstore(0x60, m3) |
| 8902 | mstore(0x80, m4) |
| 8903 | } |
| 8904 | } |
| 8905 | |
| 8906 | function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 8907 | bytes32 m0; |
| 8908 | bytes32 m1; |
| 8909 | bytes32 m2; |
| 8910 | bytes32 m3; |
| 8911 | bytes32 m4; |
| 8912 | assembly ("memory-safe") { |
| 8913 | m0 := mload(0x00) |
| 8914 | m1 := mload(0x20) |
| 8915 | m2 := mload(0x40) |
| 8916 | m3 := mload(0x60) |
| 8917 | m4 := mload(0x80) |
| 8918 | // Selector of `log(uint256,uint256,address,uint256)`. |
| 8919 | mstore(0x00, 0x88f6e4b2) |
| 8920 | mstore(0x20, p0) |
| 8921 | mstore(0x40, p1) |
| 8922 | mstore(0x60, p2) |
| 8923 | mstore(0x80, p3) |
| 8924 | } |
| 8925 | _sendLogPayload(0x1c, 0x84); |
| 8926 | assembly ("memory-safe") { |
| 8927 | mstore(0x00, m0) |
| 8928 | mstore(0x20, m1) |
| 8929 | mstore(0x40, m2) |
| 8930 | mstore(0x60, m3) |
| 8931 | mstore(0x80, m4) |
| 8932 | } |
| 8933 | } |
| 8934 | |
| 8935 | function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure { |
| 8936 | bytes32 m0; |
| 8937 | bytes32 m1; |
| 8938 | bytes32 m2; |
| 8939 | bytes32 m3; |
| 8940 | bytes32 m4; |
| 8941 | bytes32 m5; |
| 8942 | bytes32 m6; |
| 8943 | assembly ("memory-safe") { |
| 8944 | function writeString(pos, w) { |
| 8945 | let length := 0 |
| 8946 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 8947 | mstore(pos, length) |
| 8948 | let shift := sub(256, shl(3, length)) |
| 8949 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 8950 | } |
| 8951 | m0 := mload(0x00) |
| 8952 | m1 := mload(0x20) |
| 8953 | m2 := mload(0x40) |
| 8954 | m3 := mload(0x60) |
| 8955 | m4 := mload(0x80) |
| 8956 | m5 := mload(0xa0) |
| 8957 | m6 := mload(0xc0) |
| 8958 | // Selector of `log(uint256,uint256,address,string)`. |
| 8959 | mstore(0x00, 0x6cde40b8) |
| 8960 | mstore(0x20, p0) |
| 8961 | mstore(0x40, p1) |
| 8962 | mstore(0x60, p2) |
| 8963 | mstore(0x80, 0x80) |
| 8964 | writeString(0xa0, p3) |
| 8965 | } |
| 8966 | _sendLogPayload(0x1c, 0xc4); |
| 8967 | assembly ("memory-safe") { |
| 8968 | mstore(0x00, m0) |
| 8969 | mstore(0x20, m1) |
| 8970 | mstore(0x40, m2) |
| 8971 | mstore(0x60, m3) |
| 8972 | mstore(0x80, m4) |
| 8973 | mstore(0xa0, m5) |
| 8974 | mstore(0xc0, m6) |
| 8975 | } |
| 8976 | } |
| 8977 | |
| 8978 | function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { |
| 8979 | bytes32 m0; |
| 8980 | bytes32 m1; |
| 8981 | bytes32 m2; |
| 8982 | bytes32 m3; |
| 8983 | bytes32 m4; |
| 8984 | assembly ("memory-safe") { |
| 8985 | m0 := mload(0x00) |
| 8986 | m1 := mload(0x20) |
| 8987 | m2 := mload(0x40) |
| 8988 | m3 := mload(0x60) |
| 8989 | m4 := mload(0x80) |
| 8990 | // Selector of `log(uint256,uint256,bool,address)`. |
| 8991 | mstore(0x00, 0x9a816a83) |
| 8992 | mstore(0x20, p0) |
| 8993 | mstore(0x40, p1) |
| 8994 | mstore(0x60, p2) |
| 8995 | mstore(0x80, p3) |
| 8996 | } |
| 8997 | _sendLogPayload(0x1c, 0x84); |
| 8998 | assembly ("memory-safe") { |
| 8999 | mstore(0x00, m0) |
| 9000 | mstore(0x20, m1) |
| 9001 | mstore(0x40, m2) |
| 9002 | mstore(0x60, m3) |
| 9003 | mstore(0x80, m4) |
| 9004 | } |
| 9005 | } |
| 9006 | |
| 9007 | function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { |
| 9008 | bytes32 m0; |
| 9009 | bytes32 m1; |
| 9010 | bytes32 m2; |
| 9011 | bytes32 m3; |
| 9012 | bytes32 m4; |
| 9013 | assembly ("memory-safe") { |
| 9014 | m0 := mload(0x00) |
| 9015 | m1 := mload(0x20) |
| 9016 | m2 := mload(0x40) |
| 9017 | m3 := mload(0x60) |
| 9018 | m4 := mload(0x80) |
| 9019 | // Selector of `log(uint256,uint256,bool,bool)`. |
| 9020 | mstore(0x00, 0xab085ae6) |
| 9021 | mstore(0x20, p0) |
| 9022 | mstore(0x40, p1) |
| 9023 | mstore(0x60, p2) |
| 9024 | mstore(0x80, p3) |
| 9025 | } |
| 9026 | _sendLogPayload(0x1c, 0x84); |
| 9027 | assembly ("memory-safe") { |
| 9028 | mstore(0x00, m0) |
| 9029 | mstore(0x20, m1) |
| 9030 | mstore(0x40, m2) |
| 9031 | mstore(0x60, m3) |
| 9032 | mstore(0x80, m4) |
| 9033 | } |
| 9034 | } |
| 9035 | |
| 9036 | function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 9037 | bytes32 m0; |
| 9038 | bytes32 m1; |
| 9039 | bytes32 m2; |
| 9040 | bytes32 m3; |
| 9041 | bytes32 m4; |
| 9042 | assembly ("memory-safe") { |
| 9043 | m0 := mload(0x00) |
| 9044 | m1 := mload(0x20) |
| 9045 | m2 := mload(0x40) |
| 9046 | m3 := mload(0x60) |
| 9047 | m4 := mload(0x80) |
| 9048 | // Selector of `log(uint256,uint256,bool,uint256)`. |
| 9049 | mstore(0x00, 0xeb7f6fd2) |
| 9050 | mstore(0x20, p0) |
| 9051 | mstore(0x40, p1) |
| 9052 | mstore(0x60, p2) |
| 9053 | mstore(0x80, p3) |
| 9054 | } |
| 9055 | _sendLogPayload(0x1c, 0x84); |
| 9056 | assembly ("memory-safe") { |
| 9057 | mstore(0x00, m0) |
| 9058 | mstore(0x20, m1) |
| 9059 | mstore(0x40, m2) |
| 9060 | mstore(0x60, m3) |
| 9061 | mstore(0x80, m4) |
| 9062 | } |
| 9063 | } |
| 9064 | |
| 9065 | function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure { |
| 9066 | bytes32 m0; |
| 9067 | bytes32 m1; |
| 9068 | bytes32 m2; |
| 9069 | bytes32 m3; |
| 9070 | bytes32 m4; |
| 9071 | bytes32 m5; |
| 9072 | bytes32 m6; |
| 9073 | assembly ("memory-safe") { |
| 9074 | function writeString(pos, w) { |
| 9075 | let length := 0 |
| 9076 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9077 | mstore(pos, length) |
| 9078 | let shift := sub(256, shl(3, length)) |
| 9079 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9080 | } |
| 9081 | m0 := mload(0x00) |
| 9082 | m1 := mload(0x20) |
| 9083 | m2 := mload(0x40) |
| 9084 | m3 := mload(0x60) |
| 9085 | m4 := mload(0x80) |
| 9086 | m5 := mload(0xa0) |
| 9087 | m6 := mload(0xc0) |
| 9088 | // Selector of `log(uint256,uint256,bool,string)`. |
| 9089 | mstore(0x00, 0xa5b4fc99) |
| 9090 | mstore(0x20, p0) |
| 9091 | mstore(0x40, p1) |
| 9092 | mstore(0x60, p2) |
| 9093 | mstore(0x80, 0x80) |
| 9094 | writeString(0xa0, p3) |
| 9095 | } |
| 9096 | _sendLogPayload(0x1c, 0xc4); |
| 9097 | assembly ("memory-safe") { |
| 9098 | mstore(0x00, m0) |
| 9099 | mstore(0x20, m1) |
| 9100 | mstore(0x40, m2) |
| 9101 | mstore(0x60, m3) |
| 9102 | mstore(0x80, m4) |
| 9103 | mstore(0xa0, m5) |
| 9104 | mstore(0xc0, m6) |
| 9105 | } |
| 9106 | } |
| 9107 | |
| 9108 | function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 9109 | bytes32 m0; |
| 9110 | bytes32 m1; |
| 9111 | bytes32 m2; |
| 9112 | bytes32 m3; |
| 9113 | bytes32 m4; |
| 9114 | assembly ("memory-safe") { |
| 9115 | m0 := mload(0x00) |
| 9116 | m1 := mload(0x20) |
| 9117 | m2 := mload(0x40) |
| 9118 | m3 := mload(0x60) |
| 9119 | m4 := mload(0x80) |
| 9120 | // Selector of `log(uint256,uint256,uint256,address)`. |
| 9121 | mstore(0x00, 0xfa8185af) |
| 9122 | mstore(0x20, p0) |
| 9123 | mstore(0x40, p1) |
| 9124 | mstore(0x60, p2) |
| 9125 | mstore(0x80, p3) |
| 9126 | } |
| 9127 | _sendLogPayload(0x1c, 0x84); |
| 9128 | assembly ("memory-safe") { |
| 9129 | mstore(0x00, m0) |
| 9130 | mstore(0x20, m1) |
| 9131 | mstore(0x40, m2) |
| 9132 | mstore(0x60, m3) |
| 9133 | mstore(0x80, m4) |
| 9134 | } |
| 9135 | } |
| 9136 | |
| 9137 | function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 9138 | bytes32 m0; |
| 9139 | bytes32 m1; |
| 9140 | bytes32 m2; |
| 9141 | bytes32 m3; |
| 9142 | bytes32 m4; |
| 9143 | assembly ("memory-safe") { |
| 9144 | m0 := mload(0x00) |
| 9145 | m1 := mload(0x20) |
| 9146 | m2 := mload(0x40) |
| 9147 | m3 := mload(0x60) |
| 9148 | m4 := mload(0x80) |
| 9149 | // Selector of `log(uint256,uint256,uint256,bool)`. |
| 9150 | mstore(0x00, 0xc598d185) |
| 9151 | mstore(0x20, p0) |
| 9152 | mstore(0x40, p1) |
| 9153 | mstore(0x60, p2) |
| 9154 | mstore(0x80, p3) |
| 9155 | } |
| 9156 | _sendLogPayload(0x1c, 0x84); |
| 9157 | assembly ("memory-safe") { |
| 9158 | mstore(0x00, m0) |
| 9159 | mstore(0x20, m1) |
| 9160 | mstore(0x40, m2) |
| 9161 | mstore(0x60, m3) |
| 9162 | mstore(0x80, m4) |
| 9163 | } |
| 9164 | } |
| 9165 | |
| 9166 | function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 9167 | bytes32 m0; |
| 9168 | bytes32 m1; |
| 9169 | bytes32 m2; |
| 9170 | bytes32 m3; |
| 9171 | bytes32 m4; |
| 9172 | assembly ("memory-safe") { |
| 9173 | m0 := mload(0x00) |
| 9174 | m1 := mload(0x20) |
| 9175 | m2 := mload(0x40) |
| 9176 | m3 := mload(0x60) |
| 9177 | m4 := mload(0x80) |
| 9178 | // Selector of `log(uint256,uint256,uint256,uint256)`. |
| 9179 | mstore(0x00, 0x193fb800) |
| 9180 | mstore(0x20, p0) |
| 9181 | mstore(0x40, p1) |
| 9182 | mstore(0x60, p2) |
| 9183 | mstore(0x80, p3) |
| 9184 | } |
| 9185 | _sendLogPayload(0x1c, 0x84); |
| 9186 | assembly ("memory-safe") { |
| 9187 | mstore(0x00, m0) |
| 9188 | mstore(0x20, m1) |
| 9189 | mstore(0x40, m2) |
| 9190 | mstore(0x60, m3) |
| 9191 | mstore(0x80, m4) |
| 9192 | } |
| 9193 | } |
| 9194 | |
| 9195 | function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { |
| 9196 | bytes32 m0; |
| 9197 | bytes32 m1; |
| 9198 | bytes32 m2; |
| 9199 | bytes32 m3; |
| 9200 | bytes32 m4; |
| 9201 | bytes32 m5; |
| 9202 | bytes32 m6; |
| 9203 | assembly ("memory-safe") { |
| 9204 | function writeString(pos, w) { |
| 9205 | let length := 0 |
| 9206 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9207 | mstore(pos, length) |
| 9208 | let shift := sub(256, shl(3, length)) |
| 9209 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9210 | } |
| 9211 | m0 := mload(0x00) |
| 9212 | m1 := mload(0x20) |
| 9213 | m2 := mload(0x40) |
| 9214 | m3 := mload(0x60) |
| 9215 | m4 := mload(0x80) |
| 9216 | m5 := mload(0xa0) |
| 9217 | m6 := mload(0xc0) |
| 9218 | // Selector of `log(uint256,uint256,uint256,string)`. |
| 9219 | mstore(0x00, 0x59cfcbe3) |
| 9220 | mstore(0x20, p0) |
| 9221 | mstore(0x40, p1) |
| 9222 | mstore(0x60, p2) |
| 9223 | mstore(0x80, 0x80) |
| 9224 | writeString(0xa0, p3) |
| 9225 | } |
| 9226 | _sendLogPayload(0x1c, 0xc4); |
| 9227 | assembly ("memory-safe") { |
| 9228 | mstore(0x00, m0) |
| 9229 | mstore(0x20, m1) |
| 9230 | mstore(0x40, m2) |
| 9231 | mstore(0x60, m3) |
| 9232 | mstore(0x80, m4) |
| 9233 | mstore(0xa0, m5) |
| 9234 | mstore(0xc0, m6) |
| 9235 | } |
| 9236 | } |
| 9237 | |
| 9238 | function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure { |
| 9239 | bytes32 m0; |
| 9240 | bytes32 m1; |
| 9241 | bytes32 m2; |
| 9242 | bytes32 m3; |
| 9243 | bytes32 m4; |
| 9244 | bytes32 m5; |
| 9245 | bytes32 m6; |
| 9246 | assembly ("memory-safe") { |
| 9247 | function writeString(pos, w) { |
| 9248 | let length := 0 |
| 9249 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9250 | mstore(pos, length) |
| 9251 | let shift := sub(256, shl(3, length)) |
| 9252 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9253 | } |
| 9254 | m0 := mload(0x00) |
| 9255 | m1 := mload(0x20) |
| 9256 | m2 := mload(0x40) |
| 9257 | m3 := mload(0x60) |
| 9258 | m4 := mload(0x80) |
| 9259 | m5 := mload(0xa0) |
| 9260 | m6 := mload(0xc0) |
| 9261 | // Selector of `log(uint256,uint256,string,address)`. |
| 9262 | mstore(0x00, 0x42d21db7) |
| 9263 | mstore(0x20, p0) |
| 9264 | mstore(0x40, p1) |
| 9265 | mstore(0x60, 0x80) |
| 9266 | mstore(0x80, p3) |
| 9267 | writeString(0xa0, p2) |
| 9268 | } |
| 9269 | _sendLogPayload(0x1c, 0xc4); |
| 9270 | assembly ("memory-safe") { |
| 9271 | mstore(0x00, m0) |
| 9272 | mstore(0x20, m1) |
| 9273 | mstore(0x40, m2) |
| 9274 | mstore(0x60, m3) |
| 9275 | mstore(0x80, m4) |
| 9276 | mstore(0xa0, m5) |
| 9277 | mstore(0xc0, m6) |
| 9278 | } |
| 9279 | } |
| 9280 | |
| 9281 | function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure { |
| 9282 | bytes32 m0; |
| 9283 | bytes32 m1; |
| 9284 | bytes32 m2; |
| 9285 | bytes32 m3; |
| 9286 | bytes32 m4; |
| 9287 | bytes32 m5; |
| 9288 | bytes32 m6; |
| 9289 | assembly ("memory-safe") { |
| 9290 | function writeString(pos, w) { |
| 9291 | let length := 0 |
| 9292 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9293 | mstore(pos, length) |
| 9294 | let shift := sub(256, shl(3, length)) |
| 9295 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9296 | } |
| 9297 | m0 := mload(0x00) |
| 9298 | m1 := mload(0x20) |
| 9299 | m2 := mload(0x40) |
| 9300 | m3 := mload(0x60) |
| 9301 | m4 := mload(0x80) |
| 9302 | m5 := mload(0xa0) |
| 9303 | m6 := mload(0xc0) |
| 9304 | // Selector of `log(uint256,uint256,string,bool)`. |
| 9305 | mstore(0x00, 0x7af6ab25) |
| 9306 | mstore(0x20, p0) |
| 9307 | mstore(0x40, p1) |
| 9308 | mstore(0x60, 0x80) |
| 9309 | mstore(0x80, p3) |
| 9310 | writeString(0xa0, p2) |
| 9311 | } |
| 9312 | _sendLogPayload(0x1c, 0xc4); |
| 9313 | assembly ("memory-safe") { |
| 9314 | mstore(0x00, m0) |
| 9315 | mstore(0x20, m1) |
| 9316 | mstore(0x40, m2) |
| 9317 | mstore(0x60, m3) |
| 9318 | mstore(0x80, m4) |
| 9319 | mstore(0xa0, m5) |
| 9320 | mstore(0xc0, m6) |
| 9321 | } |
| 9322 | } |
| 9323 | |
| 9324 | function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { |
| 9325 | bytes32 m0; |
| 9326 | bytes32 m1; |
| 9327 | bytes32 m2; |
| 9328 | bytes32 m3; |
| 9329 | bytes32 m4; |
| 9330 | bytes32 m5; |
| 9331 | bytes32 m6; |
| 9332 | assembly ("memory-safe") { |
| 9333 | function writeString(pos, w) { |
| 9334 | let length := 0 |
| 9335 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9336 | mstore(pos, length) |
| 9337 | let shift := sub(256, shl(3, length)) |
| 9338 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9339 | } |
| 9340 | m0 := mload(0x00) |
| 9341 | m1 := mload(0x20) |
| 9342 | m2 := mload(0x40) |
| 9343 | m3 := mload(0x60) |
| 9344 | m4 := mload(0x80) |
| 9345 | m5 := mload(0xa0) |
| 9346 | m6 := mload(0xc0) |
| 9347 | // Selector of `log(uint256,uint256,string,uint256)`. |
| 9348 | mstore(0x00, 0x5da297eb) |
| 9349 | mstore(0x20, p0) |
| 9350 | mstore(0x40, p1) |
| 9351 | mstore(0x60, 0x80) |
| 9352 | mstore(0x80, p3) |
| 9353 | writeString(0xa0, p2) |
| 9354 | } |
| 9355 | _sendLogPayload(0x1c, 0xc4); |
| 9356 | assembly ("memory-safe") { |
| 9357 | mstore(0x00, m0) |
| 9358 | mstore(0x20, m1) |
| 9359 | mstore(0x40, m2) |
| 9360 | mstore(0x60, m3) |
| 9361 | mstore(0x80, m4) |
| 9362 | mstore(0xa0, m5) |
| 9363 | mstore(0xc0, m6) |
| 9364 | } |
| 9365 | } |
| 9366 | |
| 9367 | function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { |
| 9368 | bytes32 m0; |
| 9369 | bytes32 m1; |
| 9370 | bytes32 m2; |
| 9371 | bytes32 m3; |
| 9372 | bytes32 m4; |
| 9373 | bytes32 m5; |
| 9374 | bytes32 m6; |
| 9375 | bytes32 m7; |
| 9376 | bytes32 m8; |
| 9377 | assembly ("memory-safe") { |
| 9378 | function writeString(pos, w) { |
| 9379 | let length := 0 |
| 9380 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9381 | mstore(pos, length) |
| 9382 | let shift := sub(256, shl(3, length)) |
| 9383 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9384 | } |
| 9385 | m0 := mload(0x00) |
| 9386 | m1 := mload(0x20) |
| 9387 | m2 := mload(0x40) |
| 9388 | m3 := mload(0x60) |
| 9389 | m4 := mload(0x80) |
| 9390 | m5 := mload(0xa0) |
| 9391 | m6 := mload(0xc0) |
| 9392 | m7 := mload(0xe0) |
| 9393 | m8 := mload(0x100) |
| 9394 | // Selector of `log(uint256,uint256,string,string)`. |
| 9395 | mstore(0x00, 0x27d8afd2) |
| 9396 | mstore(0x20, p0) |
| 9397 | mstore(0x40, p1) |
| 9398 | mstore(0x60, 0x80) |
| 9399 | mstore(0x80, 0xc0) |
| 9400 | writeString(0xa0, p2) |
| 9401 | writeString(0xe0, p3) |
| 9402 | } |
| 9403 | _sendLogPayload(0x1c, 0x104); |
| 9404 | assembly ("memory-safe") { |
| 9405 | mstore(0x00, m0) |
| 9406 | mstore(0x20, m1) |
| 9407 | mstore(0x40, m2) |
| 9408 | mstore(0x60, m3) |
| 9409 | mstore(0x80, m4) |
| 9410 | mstore(0xa0, m5) |
| 9411 | mstore(0xc0, m6) |
| 9412 | mstore(0xe0, m7) |
| 9413 | mstore(0x100, m8) |
| 9414 | } |
| 9415 | } |
| 9416 | |
| 9417 | function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure { |
| 9418 | bytes32 m0; |
| 9419 | bytes32 m1; |
| 9420 | bytes32 m2; |
| 9421 | bytes32 m3; |
| 9422 | bytes32 m4; |
| 9423 | bytes32 m5; |
| 9424 | bytes32 m6; |
| 9425 | assembly ("memory-safe") { |
| 9426 | function writeString(pos, w) { |
| 9427 | let length := 0 |
| 9428 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9429 | mstore(pos, length) |
| 9430 | let shift := sub(256, shl(3, length)) |
| 9431 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9432 | } |
| 9433 | m0 := mload(0x00) |
| 9434 | m1 := mload(0x20) |
| 9435 | m2 := mload(0x40) |
| 9436 | m3 := mload(0x60) |
| 9437 | m4 := mload(0x80) |
| 9438 | m5 := mload(0xa0) |
| 9439 | m6 := mload(0xc0) |
| 9440 | // Selector of `log(uint256,string,address,address)`. |
| 9441 | mstore(0x00, 0x6168ed61) |
| 9442 | mstore(0x20, p0) |
| 9443 | mstore(0x40, 0x80) |
| 9444 | mstore(0x60, p2) |
| 9445 | mstore(0x80, p3) |
| 9446 | writeString(0xa0, p1) |
| 9447 | } |
| 9448 | _sendLogPayload(0x1c, 0xc4); |
| 9449 | assembly ("memory-safe") { |
| 9450 | mstore(0x00, m0) |
| 9451 | mstore(0x20, m1) |
| 9452 | mstore(0x40, m2) |
| 9453 | mstore(0x60, m3) |
| 9454 | mstore(0x80, m4) |
| 9455 | mstore(0xa0, m5) |
| 9456 | mstore(0xc0, m6) |
| 9457 | } |
| 9458 | } |
| 9459 | |
| 9460 | function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure { |
| 9461 | bytes32 m0; |
| 9462 | bytes32 m1; |
| 9463 | bytes32 m2; |
| 9464 | bytes32 m3; |
| 9465 | bytes32 m4; |
| 9466 | bytes32 m5; |
| 9467 | bytes32 m6; |
| 9468 | assembly ("memory-safe") { |
| 9469 | function writeString(pos, w) { |
| 9470 | let length := 0 |
| 9471 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9472 | mstore(pos, length) |
| 9473 | let shift := sub(256, shl(3, length)) |
| 9474 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9475 | } |
| 9476 | m0 := mload(0x00) |
| 9477 | m1 := mload(0x20) |
| 9478 | m2 := mload(0x40) |
| 9479 | m3 := mload(0x60) |
| 9480 | m4 := mload(0x80) |
| 9481 | m5 := mload(0xa0) |
| 9482 | m6 := mload(0xc0) |
| 9483 | // Selector of `log(uint256,string,address,bool)`. |
| 9484 | mstore(0x00, 0x90c30a56) |
| 9485 | mstore(0x20, p0) |
| 9486 | mstore(0x40, 0x80) |
| 9487 | mstore(0x60, p2) |
| 9488 | mstore(0x80, p3) |
| 9489 | writeString(0xa0, p1) |
| 9490 | } |
| 9491 | _sendLogPayload(0x1c, 0xc4); |
| 9492 | assembly ("memory-safe") { |
| 9493 | mstore(0x00, m0) |
| 9494 | mstore(0x20, m1) |
| 9495 | mstore(0x40, m2) |
| 9496 | mstore(0x60, m3) |
| 9497 | mstore(0x80, m4) |
| 9498 | mstore(0xa0, m5) |
| 9499 | mstore(0xc0, m6) |
| 9500 | } |
| 9501 | } |
| 9502 | |
| 9503 | function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure { |
| 9504 | bytes32 m0; |
| 9505 | bytes32 m1; |
| 9506 | bytes32 m2; |
| 9507 | bytes32 m3; |
| 9508 | bytes32 m4; |
| 9509 | bytes32 m5; |
| 9510 | bytes32 m6; |
| 9511 | assembly ("memory-safe") { |
| 9512 | function writeString(pos, w) { |
| 9513 | let length := 0 |
| 9514 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9515 | mstore(pos, length) |
| 9516 | let shift := sub(256, shl(3, length)) |
| 9517 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9518 | } |
| 9519 | m0 := mload(0x00) |
| 9520 | m1 := mload(0x20) |
| 9521 | m2 := mload(0x40) |
| 9522 | m3 := mload(0x60) |
| 9523 | m4 := mload(0x80) |
| 9524 | m5 := mload(0xa0) |
| 9525 | m6 := mload(0xc0) |
| 9526 | // Selector of `log(uint256,string,address,uint256)`. |
| 9527 | mstore(0x00, 0xe8d3018d) |
| 9528 | mstore(0x20, p0) |
| 9529 | mstore(0x40, 0x80) |
| 9530 | mstore(0x60, p2) |
| 9531 | mstore(0x80, p3) |
| 9532 | writeString(0xa0, p1) |
| 9533 | } |
| 9534 | _sendLogPayload(0x1c, 0xc4); |
| 9535 | assembly ("memory-safe") { |
| 9536 | mstore(0x00, m0) |
| 9537 | mstore(0x20, m1) |
| 9538 | mstore(0x40, m2) |
| 9539 | mstore(0x60, m3) |
| 9540 | mstore(0x80, m4) |
| 9541 | mstore(0xa0, m5) |
| 9542 | mstore(0xc0, m6) |
| 9543 | } |
| 9544 | } |
| 9545 | |
| 9546 | function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure { |
| 9547 | bytes32 m0; |
| 9548 | bytes32 m1; |
| 9549 | bytes32 m2; |
| 9550 | bytes32 m3; |
| 9551 | bytes32 m4; |
| 9552 | bytes32 m5; |
| 9553 | bytes32 m6; |
| 9554 | bytes32 m7; |
| 9555 | bytes32 m8; |
| 9556 | assembly ("memory-safe") { |
| 9557 | function writeString(pos, w) { |
| 9558 | let length := 0 |
| 9559 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9560 | mstore(pos, length) |
| 9561 | let shift := sub(256, shl(3, length)) |
| 9562 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9563 | } |
| 9564 | m0 := mload(0x00) |
| 9565 | m1 := mload(0x20) |
| 9566 | m2 := mload(0x40) |
| 9567 | m3 := mload(0x60) |
| 9568 | m4 := mload(0x80) |
| 9569 | m5 := mload(0xa0) |
| 9570 | m6 := mload(0xc0) |
| 9571 | m7 := mload(0xe0) |
| 9572 | m8 := mload(0x100) |
| 9573 | // Selector of `log(uint256,string,address,string)`. |
| 9574 | mstore(0x00, 0x9c3adfa1) |
| 9575 | mstore(0x20, p0) |
| 9576 | mstore(0x40, 0x80) |
| 9577 | mstore(0x60, p2) |
| 9578 | mstore(0x80, 0xc0) |
| 9579 | writeString(0xa0, p1) |
| 9580 | writeString(0xe0, p3) |
| 9581 | } |
| 9582 | _sendLogPayload(0x1c, 0x104); |
| 9583 | assembly ("memory-safe") { |
| 9584 | mstore(0x00, m0) |
| 9585 | mstore(0x20, m1) |
| 9586 | mstore(0x40, m2) |
| 9587 | mstore(0x60, m3) |
| 9588 | mstore(0x80, m4) |
| 9589 | mstore(0xa0, m5) |
| 9590 | mstore(0xc0, m6) |
| 9591 | mstore(0xe0, m7) |
| 9592 | mstore(0x100, m8) |
| 9593 | } |
| 9594 | } |
| 9595 | |
| 9596 | function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure { |
| 9597 | bytes32 m0; |
| 9598 | bytes32 m1; |
| 9599 | bytes32 m2; |
| 9600 | bytes32 m3; |
| 9601 | bytes32 m4; |
| 9602 | bytes32 m5; |
| 9603 | bytes32 m6; |
| 9604 | assembly ("memory-safe") { |
| 9605 | function writeString(pos, w) { |
| 9606 | let length := 0 |
| 9607 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9608 | mstore(pos, length) |
| 9609 | let shift := sub(256, shl(3, length)) |
| 9610 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9611 | } |
| 9612 | m0 := mload(0x00) |
| 9613 | m1 := mload(0x20) |
| 9614 | m2 := mload(0x40) |
| 9615 | m3 := mload(0x60) |
| 9616 | m4 := mload(0x80) |
| 9617 | m5 := mload(0xa0) |
| 9618 | m6 := mload(0xc0) |
| 9619 | // Selector of `log(uint256,string,bool,address)`. |
| 9620 | mstore(0x00, 0xae2ec581) |
| 9621 | mstore(0x20, p0) |
| 9622 | mstore(0x40, 0x80) |
| 9623 | mstore(0x60, p2) |
| 9624 | mstore(0x80, p3) |
| 9625 | writeString(0xa0, p1) |
| 9626 | } |
| 9627 | _sendLogPayload(0x1c, 0xc4); |
| 9628 | assembly ("memory-safe") { |
| 9629 | mstore(0x00, m0) |
| 9630 | mstore(0x20, m1) |
| 9631 | mstore(0x40, m2) |
| 9632 | mstore(0x60, m3) |
| 9633 | mstore(0x80, m4) |
| 9634 | mstore(0xa0, m5) |
| 9635 | mstore(0xc0, m6) |
| 9636 | } |
| 9637 | } |
| 9638 | |
| 9639 | function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure { |
| 9640 | bytes32 m0; |
| 9641 | bytes32 m1; |
| 9642 | bytes32 m2; |
| 9643 | bytes32 m3; |
| 9644 | bytes32 m4; |
| 9645 | bytes32 m5; |
| 9646 | bytes32 m6; |
| 9647 | assembly ("memory-safe") { |
| 9648 | function writeString(pos, w) { |
| 9649 | let length := 0 |
| 9650 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9651 | mstore(pos, length) |
| 9652 | let shift := sub(256, shl(3, length)) |
| 9653 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9654 | } |
| 9655 | m0 := mload(0x00) |
| 9656 | m1 := mload(0x20) |
| 9657 | m2 := mload(0x40) |
| 9658 | m3 := mload(0x60) |
| 9659 | m4 := mload(0x80) |
| 9660 | m5 := mload(0xa0) |
| 9661 | m6 := mload(0xc0) |
| 9662 | // Selector of `log(uint256,string,bool,bool)`. |
| 9663 | mstore(0x00, 0xba535d9c) |
| 9664 | mstore(0x20, p0) |
| 9665 | mstore(0x40, 0x80) |
| 9666 | mstore(0x60, p2) |
| 9667 | mstore(0x80, p3) |
| 9668 | writeString(0xa0, p1) |
| 9669 | } |
| 9670 | _sendLogPayload(0x1c, 0xc4); |
| 9671 | assembly ("memory-safe") { |
| 9672 | mstore(0x00, m0) |
| 9673 | mstore(0x20, m1) |
| 9674 | mstore(0x40, m2) |
| 9675 | mstore(0x60, m3) |
| 9676 | mstore(0x80, m4) |
| 9677 | mstore(0xa0, m5) |
| 9678 | mstore(0xc0, m6) |
| 9679 | } |
| 9680 | } |
| 9681 | |
| 9682 | function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure { |
| 9683 | bytes32 m0; |
| 9684 | bytes32 m1; |
| 9685 | bytes32 m2; |
| 9686 | bytes32 m3; |
| 9687 | bytes32 m4; |
| 9688 | bytes32 m5; |
| 9689 | bytes32 m6; |
| 9690 | assembly ("memory-safe") { |
| 9691 | function writeString(pos, w) { |
| 9692 | let length := 0 |
| 9693 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9694 | mstore(pos, length) |
| 9695 | let shift := sub(256, shl(3, length)) |
| 9696 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9697 | } |
| 9698 | m0 := mload(0x00) |
| 9699 | m1 := mload(0x20) |
| 9700 | m2 := mload(0x40) |
| 9701 | m3 := mload(0x60) |
| 9702 | m4 := mload(0x80) |
| 9703 | m5 := mload(0xa0) |
| 9704 | m6 := mload(0xc0) |
| 9705 | // Selector of `log(uint256,string,bool,uint256)`. |
| 9706 | mstore(0x00, 0xcf009880) |
| 9707 | mstore(0x20, p0) |
| 9708 | mstore(0x40, 0x80) |
| 9709 | mstore(0x60, p2) |
| 9710 | mstore(0x80, p3) |
| 9711 | writeString(0xa0, p1) |
| 9712 | } |
| 9713 | _sendLogPayload(0x1c, 0xc4); |
| 9714 | assembly ("memory-safe") { |
| 9715 | mstore(0x00, m0) |
| 9716 | mstore(0x20, m1) |
| 9717 | mstore(0x40, m2) |
| 9718 | mstore(0x60, m3) |
| 9719 | mstore(0x80, m4) |
| 9720 | mstore(0xa0, m5) |
| 9721 | mstore(0xc0, m6) |
| 9722 | } |
| 9723 | } |
| 9724 | |
| 9725 | function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { |
| 9726 | bytes32 m0; |
| 9727 | bytes32 m1; |
| 9728 | bytes32 m2; |
| 9729 | bytes32 m3; |
| 9730 | bytes32 m4; |
| 9731 | bytes32 m5; |
| 9732 | bytes32 m6; |
| 9733 | bytes32 m7; |
| 9734 | bytes32 m8; |
| 9735 | assembly ("memory-safe") { |
| 9736 | function writeString(pos, w) { |
| 9737 | let length := 0 |
| 9738 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9739 | mstore(pos, length) |
| 9740 | let shift := sub(256, shl(3, length)) |
| 9741 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9742 | } |
| 9743 | m0 := mload(0x00) |
| 9744 | m1 := mload(0x20) |
| 9745 | m2 := mload(0x40) |
| 9746 | m3 := mload(0x60) |
| 9747 | m4 := mload(0x80) |
| 9748 | m5 := mload(0xa0) |
| 9749 | m6 := mload(0xc0) |
| 9750 | m7 := mload(0xe0) |
| 9751 | m8 := mload(0x100) |
| 9752 | // Selector of `log(uint256,string,bool,string)`. |
| 9753 | mstore(0x00, 0xd2d423cd) |
| 9754 | mstore(0x20, p0) |
| 9755 | mstore(0x40, 0x80) |
| 9756 | mstore(0x60, p2) |
| 9757 | mstore(0x80, 0xc0) |
| 9758 | writeString(0xa0, p1) |
| 9759 | writeString(0xe0, p3) |
| 9760 | } |
| 9761 | _sendLogPayload(0x1c, 0x104); |
| 9762 | assembly ("memory-safe") { |
| 9763 | mstore(0x00, m0) |
| 9764 | mstore(0x20, m1) |
| 9765 | mstore(0x40, m2) |
| 9766 | mstore(0x60, m3) |
| 9767 | mstore(0x80, m4) |
| 9768 | mstore(0xa0, m5) |
| 9769 | mstore(0xc0, m6) |
| 9770 | mstore(0xe0, m7) |
| 9771 | mstore(0x100, m8) |
| 9772 | } |
| 9773 | } |
| 9774 | |
| 9775 | function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure { |
| 9776 | bytes32 m0; |
| 9777 | bytes32 m1; |
| 9778 | bytes32 m2; |
| 9779 | bytes32 m3; |
| 9780 | bytes32 m4; |
| 9781 | bytes32 m5; |
| 9782 | bytes32 m6; |
| 9783 | assembly ("memory-safe") { |
| 9784 | function writeString(pos, w) { |
| 9785 | let length := 0 |
| 9786 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9787 | mstore(pos, length) |
| 9788 | let shift := sub(256, shl(3, length)) |
| 9789 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9790 | } |
| 9791 | m0 := mload(0x00) |
| 9792 | m1 := mload(0x20) |
| 9793 | m2 := mload(0x40) |
| 9794 | m3 := mload(0x60) |
| 9795 | m4 := mload(0x80) |
| 9796 | m5 := mload(0xa0) |
| 9797 | m6 := mload(0xc0) |
| 9798 | // Selector of `log(uint256,string,uint256,address)`. |
| 9799 | mstore(0x00, 0x3b2279b4) |
| 9800 | mstore(0x20, p0) |
| 9801 | mstore(0x40, 0x80) |
| 9802 | mstore(0x60, p2) |
| 9803 | mstore(0x80, p3) |
| 9804 | writeString(0xa0, p1) |
| 9805 | } |
| 9806 | _sendLogPayload(0x1c, 0xc4); |
| 9807 | assembly ("memory-safe") { |
| 9808 | mstore(0x00, m0) |
| 9809 | mstore(0x20, m1) |
| 9810 | mstore(0x40, m2) |
| 9811 | mstore(0x60, m3) |
| 9812 | mstore(0x80, m4) |
| 9813 | mstore(0xa0, m5) |
| 9814 | mstore(0xc0, m6) |
| 9815 | } |
| 9816 | } |
| 9817 | |
| 9818 | function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure { |
| 9819 | bytes32 m0; |
| 9820 | bytes32 m1; |
| 9821 | bytes32 m2; |
| 9822 | bytes32 m3; |
| 9823 | bytes32 m4; |
| 9824 | bytes32 m5; |
| 9825 | bytes32 m6; |
| 9826 | assembly ("memory-safe") { |
| 9827 | function writeString(pos, w) { |
| 9828 | let length := 0 |
| 9829 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9830 | mstore(pos, length) |
| 9831 | let shift := sub(256, shl(3, length)) |
| 9832 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9833 | } |
| 9834 | m0 := mload(0x00) |
| 9835 | m1 := mload(0x20) |
| 9836 | m2 := mload(0x40) |
| 9837 | m3 := mload(0x60) |
| 9838 | m4 := mload(0x80) |
| 9839 | m5 := mload(0xa0) |
| 9840 | m6 := mload(0xc0) |
| 9841 | // Selector of `log(uint256,string,uint256,bool)`. |
| 9842 | mstore(0x00, 0x691a8f74) |
| 9843 | mstore(0x20, p0) |
| 9844 | mstore(0x40, 0x80) |
| 9845 | mstore(0x60, p2) |
| 9846 | mstore(0x80, p3) |
| 9847 | writeString(0xa0, p1) |
| 9848 | } |
| 9849 | _sendLogPayload(0x1c, 0xc4); |
| 9850 | assembly ("memory-safe") { |
| 9851 | mstore(0x00, m0) |
| 9852 | mstore(0x20, m1) |
| 9853 | mstore(0x40, m2) |
| 9854 | mstore(0x60, m3) |
| 9855 | mstore(0x80, m4) |
| 9856 | mstore(0xa0, m5) |
| 9857 | mstore(0xc0, m6) |
| 9858 | } |
| 9859 | } |
| 9860 | |
| 9861 | function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { |
| 9862 | bytes32 m0; |
| 9863 | bytes32 m1; |
| 9864 | bytes32 m2; |
| 9865 | bytes32 m3; |
| 9866 | bytes32 m4; |
| 9867 | bytes32 m5; |
| 9868 | bytes32 m6; |
| 9869 | assembly ("memory-safe") { |
| 9870 | function writeString(pos, w) { |
| 9871 | let length := 0 |
| 9872 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9873 | mstore(pos, length) |
| 9874 | let shift := sub(256, shl(3, length)) |
| 9875 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9876 | } |
| 9877 | m0 := mload(0x00) |
| 9878 | m1 := mload(0x20) |
| 9879 | m2 := mload(0x40) |
| 9880 | m3 := mload(0x60) |
| 9881 | m4 := mload(0x80) |
| 9882 | m5 := mload(0xa0) |
| 9883 | m6 := mload(0xc0) |
| 9884 | // Selector of `log(uint256,string,uint256,uint256)`. |
| 9885 | mstore(0x00, 0x82c25b74) |
| 9886 | mstore(0x20, p0) |
| 9887 | mstore(0x40, 0x80) |
| 9888 | mstore(0x60, p2) |
| 9889 | mstore(0x80, p3) |
| 9890 | writeString(0xa0, p1) |
| 9891 | } |
| 9892 | _sendLogPayload(0x1c, 0xc4); |
| 9893 | assembly ("memory-safe") { |
| 9894 | mstore(0x00, m0) |
| 9895 | mstore(0x20, m1) |
| 9896 | mstore(0x40, m2) |
| 9897 | mstore(0x60, m3) |
| 9898 | mstore(0x80, m4) |
| 9899 | mstore(0xa0, m5) |
| 9900 | mstore(0xc0, m6) |
| 9901 | } |
| 9902 | } |
| 9903 | |
| 9904 | function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { |
| 9905 | bytes32 m0; |
| 9906 | bytes32 m1; |
| 9907 | bytes32 m2; |
| 9908 | bytes32 m3; |
| 9909 | bytes32 m4; |
| 9910 | bytes32 m5; |
| 9911 | bytes32 m6; |
| 9912 | bytes32 m7; |
| 9913 | bytes32 m8; |
| 9914 | assembly ("memory-safe") { |
| 9915 | function writeString(pos, w) { |
| 9916 | let length := 0 |
| 9917 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9918 | mstore(pos, length) |
| 9919 | let shift := sub(256, shl(3, length)) |
| 9920 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9921 | } |
| 9922 | m0 := mload(0x00) |
| 9923 | m1 := mload(0x20) |
| 9924 | m2 := mload(0x40) |
| 9925 | m3 := mload(0x60) |
| 9926 | m4 := mload(0x80) |
| 9927 | m5 := mload(0xa0) |
| 9928 | m6 := mload(0xc0) |
| 9929 | m7 := mload(0xe0) |
| 9930 | m8 := mload(0x100) |
| 9931 | // Selector of `log(uint256,string,uint256,string)`. |
| 9932 | mstore(0x00, 0xb7b914ca) |
| 9933 | mstore(0x20, p0) |
| 9934 | mstore(0x40, 0x80) |
| 9935 | mstore(0x60, p2) |
| 9936 | mstore(0x80, 0xc0) |
| 9937 | writeString(0xa0, p1) |
| 9938 | writeString(0xe0, p3) |
| 9939 | } |
| 9940 | _sendLogPayload(0x1c, 0x104); |
| 9941 | assembly ("memory-safe") { |
| 9942 | mstore(0x00, m0) |
| 9943 | mstore(0x20, m1) |
| 9944 | mstore(0x40, m2) |
| 9945 | mstore(0x60, m3) |
| 9946 | mstore(0x80, m4) |
| 9947 | mstore(0xa0, m5) |
| 9948 | mstore(0xc0, m6) |
| 9949 | mstore(0xe0, m7) |
| 9950 | mstore(0x100, m8) |
| 9951 | } |
| 9952 | } |
| 9953 | |
| 9954 | function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure { |
| 9955 | bytes32 m0; |
| 9956 | bytes32 m1; |
| 9957 | bytes32 m2; |
| 9958 | bytes32 m3; |
| 9959 | bytes32 m4; |
| 9960 | bytes32 m5; |
| 9961 | bytes32 m6; |
| 9962 | bytes32 m7; |
| 9963 | bytes32 m8; |
| 9964 | assembly ("memory-safe") { |
| 9965 | function writeString(pos, w) { |
| 9966 | let length := 0 |
| 9967 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 9968 | mstore(pos, length) |
| 9969 | let shift := sub(256, shl(3, length)) |
| 9970 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 9971 | } |
| 9972 | m0 := mload(0x00) |
| 9973 | m1 := mload(0x20) |
| 9974 | m2 := mload(0x40) |
| 9975 | m3 := mload(0x60) |
| 9976 | m4 := mload(0x80) |
| 9977 | m5 := mload(0xa0) |
| 9978 | m6 := mload(0xc0) |
| 9979 | m7 := mload(0xe0) |
| 9980 | m8 := mload(0x100) |
| 9981 | // Selector of `log(uint256,string,string,address)`. |
| 9982 | mstore(0x00, 0xd583c602) |
| 9983 | mstore(0x20, p0) |
| 9984 | mstore(0x40, 0x80) |
| 9985 | mstore(0x60, 0xc0) |
| 9986 | mstore(0x80, p3) |
| 9987 | writeString(0xa0, p1) |
| 9988 | writeString(0xe0, p2) |
| 9989 | } |
| 9990 | _sendLogPayload(0x1c, 0x104); |
| 9991 | assembly ("memory-safe") { |
| 9992 | mstore(0x00, m0) |
| 9993 | mstore(0x20, m1) |
| 9994 | mstore(0x40, m2) |
| 9995 | mstore(0x60, m3) |
| 9996 | mstore(0x80, m4) |
| 9997 | mstore(0xa0, m5) |
| 9998 | mstore(0xc0, m6) |
| 9999 | mstore(0xe0, m7) |
| 10000 | mstore(0x100, m8) |
| 10001 | } |
| 10002 | } |
| 10003 | |
| 10004 | function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { |
| 10005 | bytes32 m0; |
| 10006 | bytes32 m1; |
| 10007 | bytes32 m2; |
| 10008 | bytes32 m3; |
| 10009 | bytes32 m4; |
| 10010 | bytes32 m5; |
| 10011 | bytes32 m6; |
| 10012 | bytes32 m7; |
| 10013 | bytes32 m8; |
| 10014 | assembly ("memory-safe") { |
| 10015 | function writeString(pos, w) { |
| 10016 | let length := 0 |
| 10017 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10018 | mstore(pos, length) |
| 10019 | let shift := sub(256, shl(3, length)) |
| 10020 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10021 | } |
| 10022 | m0 := mload(0x00) |
| 10023 | m1 := mload(0x20) |
| 10024 | m2 := mload(0x40) |
| 10025 | m3 := mload(0x60) |
| 10026 | m4 := mload(0x80) |
| 10027 | m5 := mload(0xa0) |
| 10028 | m6 := mload(0xc0) |
| 10029 | m7 := mload(0xe0) |
| 10030 | m8 := mload(0x100) |
| 10031 | // Selector of `log(uint256,string,string,bool)`. |
| 10032 | mstore(0x00, 0xb3a6b6bd) |
| 10033 | mstore(0x20, p0) |
| 10034 | mstore(0x40, 0x80) |
| 10035 | mstore(0x60, 0xc0) |
| 10036 | mstore(0x80, p3) |
| 10037 | writeString(0xa0, p1) |
| 10038 | writeString(0xe0, p2) |
| 10039 | } |
| 10040 | _sendLogPayload(0x1c, 0x104); |
| 10041 | assembly ("memory-safe") { |
| 10042 | mstore(0x00, m0) |
| 10043 | mstore(0x20, m1) |
| 10044 | mstore(0x40, m2) |
| 10045 | mstore(0x60, m3) |
| 10046 | mstore(0x80, m4) |
| 10047 | mstore(0xa0, m5) |
| 10048 | mstore(0xc0, m6) |
| 10049 | mstore(0xe0, m7) |
| 10050 | mstore(0x100, m8) |
| 10051 | } |
| 10052 | } |
| 10053 | |
| 10054 | function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { |
| 10055 | bytes32 m0; |
| 10056 | bytes32 m1; |
| 10057 | bytes32 m2; |
| 10058 | bytes32 m3; |
| 10059 | bytes32 m4; |
| 10060 | bytes32 m5; |
| 10061 | bytes32 m6; |
| 10062 | bytes32 m7; |
| 10063 | bytes32 m8; |
| 10064 | assembly ("memory-safe") { |
| 10065 | function writeString(pos, w) { |
| 10066 | let length := 0 |
| 10067 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10068 | mstore(pos, length) |
| 10069 | let shift := sub(256, shl(3, length)) |
| 10070 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10071 | } |
| 10072 | m0 := mload(0x00) |
| 10073 | m1 := mload(0x20) |
| 10074 | m2 := mload(0x40) |
| 10075 | m3 := mload(0x60) |
| 10076 | m4 := mload(0x80) |
| 10077 | m5 := mload(0xa0) |
| 10078 | m6 := mload(0xc0) |
| 10079 | m7 := mload(0xe0) |
| 10080 | m8 := mload(0x100) |
| 10081 | // Selector of `log(uint256,string,string,uint256)`. |
| 10082 | mstore(0x00, 0xb028c9bd) |
| 10083 | mstore(0x20, p0) |
| 10084 | mstore(0x40, 0x80) |
| 10085 | mstore(0x60, 0xc0) |
| 10086 | mstore(0x80, p3) |
| 10087 | writeString(0xa0, p1) |
| 10088 | writeString(0xe0, p2) |
| 10089 | } |
| 10090 | _sendLogPayload(0x1c, 0x104); |
| 10091 | assembly ("memory-safe") { |
| 10092 | mstore(0x00, m0) |
| 10093 | mstore(0x20, m1) |
| 10094 | mstore(0x40, m2) |
| 10095 | mstore(0x60, m3) |
| 10096 | mstore(0x80, m4) |
| 10097 | mstore(0xa0, m5) |
| 10098 | mstore(0xc0, m6) |
| 10099 | mstore(0xe0, m7) |
| 10100 | mstore(0x100, m8) |
| 10101 | } |
| 10102 | } |
| 10103 | |
| 10104 | function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { |
| 10105 | bytes32 m0; |
| 10106 | bytes32 m1; |
| 10107 | bytes32 m2; |
| 10108 | bytes32 m3; |
| 10109 | bytes32 m4; |
| 10110 | bytes32 m5; |
| 10111 | bytes32 m6; |
| 10112 | bytes32 m7; |
| 10113 | bytes32 m8; |
| 10114 | bytes32 m9; |
| 10115 | bytes32 m10; |
| 10116 | assembly ("memory-safe") { |
| 10117 | function writeString(pos, w) { |
| 10118 | let length := 0 |
| 10119 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10120 | mstore(pos, length) |
| 10121 | let shift := sub(256, shl(3, length)) |
| 10122 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10123 | } |
| 10124 | m0 := mload(0x00) |
| 10125 | m1 := mload(0x20) |
| 10126 | m2 := mload(0x40) |
| 10127 | m3 := mload(0x60) |
| 10128 | m4 := mload(0x80) |
| 10129 | m5 := mload(0xa0) |
| 10130 | m6 := mload(0xc0) |
| 10131 | m7 := mload(0xe0) |
| 10132 | m8 := mload(0x100) |
| 10133 | m9 := mload(0x120) |
| 10134 | m10 := mload(0x140) |
| 10135 | // Selector of `log(uint256,string,string,string)`. |
| 10136 | mstore(0x00, 0x21ad0683) |
| 10137 | mstore(0x20, p0) |
| 10138 | mstore(0x40, 0x80) |
| 10139 | mstore(0x60, 0xc0) |
| 10140 | mstore(0x80, 0x100) |
| 10141 | writeString(0xa0, p1) |
| 10142 | writeString(0xe0, p2) |
| 10143 | writeString(0x120, p3) |
| 10144 | } |
| 10145 | _sendLogPayload(0x1c, 0x144); |
| 10146 | assembly ("memory-safe") { |
| 10147 | mstore(0x00, m0) |
| 10148 | mstore(0x20, m1) |
| 10149 | mstore(0x40, m2) |
| 10150 | mstore(0x60, m3) |
| 10151 | mstore(0x80, m4) |
| 10152 | mstore(0xa0, m5) |
| 10153 | mstore(0xc0, m6) |
| 10154 | mstore(0xe0, m7) |
| 10155 | mstore(0x100, m8) |
| 10156 | mstore(0x120, m9) |
| 10157 | mstore(0x140, m10) |
| 10158 | } |
| 10159 | } |
| 10160 | |
| 10161 | function log(bytes32 p0, address p1, address p2, address p3) internal pure { |
| 10162 | bytes32 m0; |
| 10163 | bytes32 m1; |
| 10164 | bytes32 m2; |
| 10165 | bytes32 m3; |
| 10166 | bytes32 m4; |
| 10167 | bytes32 m5; |
| 10168 | bytes32 m6; |
| 10169 | assembly ("memory-safe") { |
| 10170 | function writeString(pos, w) { |
| 10171 | let length := 0 |
| 10172 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10173 | mstore(pos, length) |
| 10174 | let shift := sub(256, shl(3, length)) |
| 10175 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10176 | } |
| 10177 | m0 := mload(0x00) |
| 10178 | m1 := mload(0x20) |
| 10179 | m2 := mload(0x40) |
| 10180 | m3 := mload(0x60) |
| 10181 | m4 := mload(0x80) |
| 10182 | m5 := mload(0xa0) |
| 10183 | m6 := mload(0xc0) |
| 10184 | // Selector of `log(string,address,address,address)`. |
| 10185 | mstore(0x00, 0xed8f28f6) |
| 10186 | mstore(0x20, 0x80) |
| 10187 | mstore(0x40, p1) |
| 10188 | mstore(0x60, p2) |
| 10189 | mstore(0x80, p3) |
| 10190 | writeString(0xa0, p0) |
| 10191 | } |
| 10192 | _sendLogPayload(0x1c, 0xc4); |
| 10193 | assembly ("memory-safe") { |
| 10194 | mstore(0x00, m0) |
| 10195 | mstore(0x20, m1) |
| 10196 | mstore(0x40, m2) |
| 10197 | mstore(0x60, m3) |
| 10198 | mstore(0x80, m4) |
| 10199 | mstore(0xa0, m5) |
| 10200 | mstore(0xc0, m6) |
| 10201 | } |
| 10202 | } |
| 10203 | |
| 10204 | function log(bytes32 p0, address p1, address p2, bool p3) internal pure { |
| 10205 | bytes32 m0; |
| 10206 | bytes32 m1; |
| 10207 | bytes32 m2; |
| 10208 | bytes32 m3; |
| 10209 | bytes32 m4; |
| 10210 | bytes32 m5; |
| 10211 | bytes32 m6; |
| 10212 | assembly ("memory-safe") { |
| 10213 | function writeString(pos, w) { |
| 10214 | let length := 0 |
| 10215 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10216 | mstore(pos, length) |
| 10217 | let shift := sub(256, shl(3, length)) |
| 10218 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10219 | } |
| 10220 | m0 := mload(0x00) |
| 10221 | m1 := mload(0x20) |
| 10222 | m2 := mload(0x40) |
| 10223 | m3 := mload(0x60) |
| 10224 | m4 := mload(0x80) |
| 10225 | m5 := mload(0xa0) |
| 10226 | m6 := mload(0xc0) |
| 10227 | // Selector of `log(string,address,address,bool)`. |
| 10228 | mstore(0x00, 0xb59dbd60) |
| 10229 | mstore(0x20, 0x80) |
| 10230 | mstore(0x40, p1) |
| 10231 | mstore(0x60, p2) |
| 10232 | mstore(0x80, p3) |
| 10233 | writeString(0xa0, p0) |
| 10234 | } |
| 10235 | _sendLogPayload(0x1c, 0xc4); |
| 10236 | assembly ("memory-safe") { |
| 10237 | mstore(0x00, m0) |
| 10238 | mstore(0x20, m1) |
| 10239 | mstore(0x40, m2) |
| 10240 | mstore(0x60, m3) |
| 10241 | mstore(0x80, m4) |
| 10242 | mstore(0xa0, m5) |
| 10243 | mstore(0xc0, m6) |
| 10244 | } |
| 10245 | } |
| 10246 | |
| 10247 | function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure { |
| 10248 | bytes32 m0; |
| 10249 | bytes32 m1; |
| 10250 | bytes32 m2; |
| 10251 | bytes32 m3; |
| 10252 | bytes32 m4; |
| 10253 | bytes32 m5; |
| 10254 | bytes32 m6; |
| 10255 | assembly ("memory-safe") { |
| 10256 | function writeString(pos, w) { |
| 10257 | let length := 0 |
| 10258 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10259 | mstore(pos, length) |
| 10260 | let shift := sub(256, shl(3, length)) |
| 10261 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10262 | } |
| 10263 | m0 := mload(0x00) |
| 10264 | m1 := mload(0x20) |
| 10265 | m2 := mload(0x40) |
| 10266 | m3 := mload(0x60) |
| 10267 | m4 := mload(0x80) |
| 10268 | m5 := mload(0xa0) |
| 10269 | m6 := mload(0xc0) |
| 10270 | // Selector of `log(string,address,address,uint256)`. |
| 10271 | mstore(0x00, 0x8ef3f399) |
| 10272 | mstore(0x20, 0x80) |
| 10273 | mstore(0x40, p1) |
| 10274 | mstore(0x60, p2) |
| 10275 | mstore(0x80, p3) |
| 10276 | writeString(0xa0, p0) |
| 10277 | } |
| 10278 | _sendLogPayload(0x1c, 0xc4); |
| 10279 | assembly ("memory-safe") { |
| 10280 | mstore(0x00, m0) |
| 10281 | mstore(0x20, m1) |
| 10282 | mstore(0x40, m2) |
| 10283 | mstore(0x60, m3) |
| 10284 | mstore(0x80, m4) |
| 10285 | mstore(0xa0, m5) |
| 10286 | mstore(0xc0, m6) |
| 10287 | } |
| 10288 | } |
| 10289 | |
| 10290 | function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure { |
| 10291 | bytes32 m0; |
| 10292 | bytes32 m1; |
| 10293 | bytes32 m2; |
| 10294 | bytes32 m3; |
| 10295 | bytes32 m4; |
| 10296 | bytes32 m5; |
| 10297 | bytes32 m6; |
| 10298 | bytes32 m7; |
| 10299 | bytes32 m8; |
| 10300 | assembly ("memory-safe") { |
| 10301 | function writeString(pos, w) { |
| 10302 | let length := 0 |
| 10303 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10304 | mstore(pos, length) |
| 10305 | let shift := sub(256, shl(3, length)) |
| 10306 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10307 | } |
| 10308 | m0 := mload(0x00) |
| 10309 | m1 := mload(0x20) |
| 10310 | m2 := mload(0x40) |
| 10311 | m3 := mload(0x60) |
| 10312 | m4 := mload(0x80) |
| 10313 | m5 := mload(0xa0) |
| 10314 | m6 := mload(0xc0) |
| 10315 | m7 := mload(0xe0) |
| 10316 | m8 := mload(0x100) |
| 10317 | // Selector of `log(string,address,address,string)`. |
| 10318 | mstore(0x00, 0x800a1c67) |
| 10319 | mstore(0x20, 0x80) |
| 10320 | mstore(0x40, p1) |
| 10321 | mstore(0x60, p2) |
| 10322 | mstore(0x80, 0xc0) |
| 10323 | writeString(0xa0, p0) |
| 10324 | writeString(0xe0, p3) |
| 10325 | } |
| 10326 | _sendLogPayload(0x1c, 0x104); |
| 10327 | assembly ("memory-safe") { |
| 10328 | mstore(0x00, m0) |
| 10329 | mstore(0x20, m1) |
| 10330 | mstore(0x40, m2) |
| 10331 | mstore(0x60, m3) |
| 10332 | mstore(0x80, m4) |
| 10333 | mstore(0xa0, m5) |
| 10334 | mstore(0xc0, m6) |
| 10335 | mstore(0xe0, m7) |
| 10336 | mstore(0x100, m8) |
| 10337 | } |
| 10338 | } |
| 10339 | |
| 10340 | function log(bytes32 p0, address p1, bool p2, address p3) internal pure { |
| 10341 | bytes32 m0; |
| 10342 | bytes32 m1; |
| 10343 | bytes32 m2; |
| 10344 | bytes32 m3; |
| 10345 | bytes32 m4; |
| 10346 | bytes32 m5; |
| 10347 | bytes32 m6; |
| 10348 | assembly ("memory-safe") { |
| 10349 | function writeString(pos, w) { |
| 10350 | let length := 0 |
| 10351 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10352 | mstore(pos, length) |
| 10353 | let shift := sub(256, shl(3, length)) |
| 10354 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10355 | } |
| 10356 | m0 := mload(0x00) |
| 10357 | m1 := mload(0x20) |
| 10358 | m2 := mload(0x40) |
| 10359 | m3 := mload(0x60) |
| 10360 | m4 := mload(0x80) |
| 10361 | m5 := mload(0xa0) |
| 10362 | m6 := mload(0xc0) |
| 10363 | // Selector of `log(string,address,bool,address)`. |
| 10364 | mstore(0x00, 0x223603bd) |
| 10365 | mstore(0x20, 0x80) |
| 10366 | mstore(0x40, p1) |
| 10367 | mstore(0x60, p2) |
| 10368 | mstore(0x80, p3) |
| 10369 | writeString(0xa0, p0) |
| 10370 | } |
| 10371 | _sendLogPayload(0x1c, 0xc4); |
| 10372 | assembly ("memory-safe") { |
| 10373 | mstore(0x00, m0) |
| 10374 | mstore(0x20, m1) |
| 10375 | mstore(0x40, m2) |
| 10376 | mstore(0x60, m3) |
| 10377 | mstore(0x80, m4) |
| 10378 | mstore(0xa0, m5) |
| 10379 | mstore(0xc0, m6) |
| 10380 | } |
| 10381 | } |
| 10382 | |
| 10383 | function log(bytes32 p0, address p1, bool p2, bool p3) internal pure { |
| 10384 | bytes32 m0; |
| 10385 | bytes32 m1; |
| 10386 | bytes32 m2; |
| 10387 | bytes32 m3; |
| 10388 | bytes32 m4; |
| 10389 | bytes32 m5; |
| 10390 | bytes32 m6; |
| 10391 | assembly ("memory-safe") { |
| 10392 | function writeString(pos, w) { |
| 10393 | let length := 0 |
| 10394 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10395 | mstore(pos, length) |
| 10396 | let shift := sub(256, shl(3, length)) |
| 10397 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10398 | } |
| 10399 | m0 := mload(0x00) |
| 10400 | m1 := mload(0x20) |
| 10401 | m2 := mload(0x40) |
| 10402 | m3 := mload(0x60) |
| 10403 | m4 := mload(0x80) |
| 10404 | m5 := mload(0xa0) |
| 10405 | m6 := mload(0xc0) |
| 10406 | // Selector of `log(string,address,bool,bool)`. |
| 10407 | mstore(0x00, 0x79884c2b) |
| 10408 | mstore(0x20, 0x80) |
| 10409 | mstore(0x40, p1) |
| 10410 | mstore(0x60, p2) |
| 10411 | mstore(0x80, p3) |
| 10412 | writeString(0xa0, p0) |
| 10413 | } |
| 10414 | _sendLogPayload(0x1c, 0xc4); |
| 10415 | assembly ("memory-safe") { |
| 10416 | mstore(0x00, m0) |
| 10417 | mstore(0x20, m1) |
| 10418 | mstore(0x40, m2) |
| 10419 | mstore(0x60, m3) |
| 10420 | mstore(0x80, m4) |
| 10421 | mstore(0xa0, m5) |
| 10422 | mstore(0xc0, m6) |
| 10423 | } |
| 10424 | } |
| 10425 | |
| 10426 | function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure { |
| 10427 | bytes32 m0; |
| 10428 | bytes32 m1; |
| 10429 | bytes32 m2; |
| 10430 | bytes32 m3; |
| 10431 | bytes32 m4; |
| 10432 | bytes32 m5; |
| 10433 | bytes32 m6; |
| 10434 | assembly ("memory-safe") { |
| 10435 | function writeString(pos, w) { |
| 10436 | let length := 0 |
| 10437 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10438 | mstore(pos, length) |
| 10439 | let shift := sub(256, shl(3, length)) |
| 10440 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10441 | } |
| 10442 | m0 := mload(0x00) |
| 10443 | m1 := mload(0x20) |
| 10444 | m2 := mload(0x40) |
| 10445 | m3 := mload(0x60) |
| 10446 | m4 := mload(0x80) |
| 10447 | m5 := mload(0xa0) |
| 10448 | m6 := mload(0xc0) |
| 10449 | // Selector of `log(string,address,bool,uint256)`. |
| 10450 | mstore(0x00, 0x3e9f866a) |
| 10451 | mstore(0x20, 0x80) |
| 10452 | mstore(0x40, p1) |
| 10453 | mstore(0x60, p2) |
| 10454 | mstore(0x80, p3) |
| 10455 | writeString(0xa0, p0) |
| 10456 | } |
| 10457 | _sendLogPayload(0x1c, 0xc4); |
| 10458 | assembly ("memory-safe") { |
| 10459 | mstore(0x00, m0) |
| 10460 | mstore(0x20, m1) |
| 10461 | mstore(0x40, m2) |
| 10462 | mstore(0x60, m3) |
| 10463 | mstore(0x80, m4) |
| 10464 | mstore(0xa0, m5) |
| 10465 | mstore(0xc0, m6) |
| 10466 | } |
| 10467 | } |
| 10468 | |
| 10469 | function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure { |
| 10470 | bytes32 m0; |
| 10471 | bytes32 m1; |
| 10472 | bytes32 m2; |
| 10473 | bytes32 m3; |
| 10474 | bytes32 m4; |
| 10475 | bytes32 m5; |
| 10476 | bytes32 m6; |
| 10477 | bytes32 m7; |
| 10478 | bytes32 m8; |
| 10479 | assembly ("memory-safe") { |
| 10480 | function writeString(pos, w) { |
| 10481 | let length := 0 |
| 10482 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10483 | mstore(pos, length) |
| 10484 | let shift := sub(256, shl(3, length)) |
| 10485 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10486 | } |
| 10487 | m0 := mload(0x00) |
| 10488 | m1 := mload(0x20) |
| 10489 | m2 := mload(0x40) |
| 10490 | m3 := mload(0x60) |
| 10491 | m4 := mload(0x80) |
| 10492 | m5 := mload(0xa0) |
| 10493 | m6 := mload(0xc0) |
| 10494 | m7 := mload(0xe0) |
| 10495 | m8 := mload(0x100) |
| 10496 | // Selector of `log(string,address,bool,string)`. |
| 10497 | mstore(0x00, 0x0454c079) |
| 10498 | mstore(0x20, 0x80) |
| 10499 | mstore(0x40, p1) |
| 10500 | mstore(0x60, p2) |
| 10501 | mstore(0x80, 0xc0) |
| 10502 | writeString(0xa0, p0) |
| 10503 | writeString(0xe0, p3) |
| 10504 | } |
| 10505 | _sendLogPayload(0x1c, 0x104); |
| 10506 | assembly ("memory-safe") { |
| 10507 | mstore(0x00, m0) |
| 10508 | mstore(0x20, m1) |
| 10509 | mstore(0x40, m2) |
| 10510 | mstore(0x60, m3) |
| 10511 | mstore(0x80, m4) |
| 10512 | mstore(0xa0, m5) |
| 10513 | mstore(0xc0, m6) |
| 10514 | mstore(0xe0, m7) |
| 10515 | mstore(0x100, m8) |
| 10516 | } |
| 10517 | } |
| 10518 | |
| 10519 | function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure { |
| 10520 | bytes32 m0; |
| 10521 | bytes32 m1; |
| 10522 | bytes32 m2; |
| 10523 | bytes32 m3; |
| 10524 | bytes32 m4; |
| 10525 | bytes32 m5; |
| 10526 | bytes32 m6; |
| 10527 | assembly ("memory-safe") { |
| 10528 | function writeString(pos, w) { |
| 10529 | let length := 0 |
| 10530 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10531 | mstore(pos, length) |
| 10532 | let shift := sub(256, shl(3, length)) |
| 10533 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10534 | } |
| 10535 | m0 := mload(0x00) |
| 10536 | m1 := mload(0x20) |
| 10537 | m2 := mload(0x40) |
| 10538 | m3 := mload(0x60) |
| 10539 | m4 := mload(0x80) |
| 10540 | m5 := mload(0xa0) |
| 10541 | m6 := mload(0xc0) |
| 10542 | // Selector of `log(string,address,uint256,address)`. |
| 10543 | mstore(0x00, 0x63fb8bc5) |
| 10544 | mstore(0x20, 0x80) |
| 10545 | mstore(0x40, p1) |
| 10546 | mstore(0x60, p2) |
| 10547 | mstore(0x80, p3) |
| 10548 | writeString(0xa0, p0) |
| 10549 | } |
| 10550 | _sendLogPayload(0x1c, 0xc4); |
| 10551 | assembly ("memory-safe") { |
| 10552 | mstore(0x00, m0) |
| 10553 | mstore(0x20, m1) |
| 10554 | mstore(0x40, m2) |
| 10555 | mstore(0x60, m3) |
| 10556 | mstore(0x80, m4) |
| 10557 | mstore(0xa0, m5) |
| 10558 | mstore(0xc0, m6) |
| 10559 | } |
| 10560 | } |
| 10561 | |
| 10562 | function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure { |
| 10563 | bytes32 m0; |
| 10564 | bytes32 m1; |
| 10565 | bytes32 m2; |
| 10566 | bytes32 m3; |
| 10567 | bytes32 m4; |
| 10568 | bytes32 m5; |
| 10569 | bytes32 m6; |
| 10570 | assembly ("memory-safe") { |
| 10571 | function writeString(pos, w) { |
| 10572 | let length := 0 |
| 10573 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10574 | mstore(pos, length) |
| 10575 | let shift := sub(256, shl(3, length)) |
| 10576 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10577 | } |
| 10578 | m0 := mload(0x00) |
| 10579 | m1 := mload(0x20) |
| 10580 | m2 := mload(0x40) |
| 10581 | m3 := mload(0x60) |
| 10582 | m4 := mload(0x80) |
| 10583 | m5 := mload(0xa0) |
| 10584 | m6 := mload(0xc0) |
| 10585 | // Selector of `log(string,address,uint256,bool)`. |
| 10586 | mstore(0x00, 0xfc4845f0) |
| 10587 | mstore(0x20, 0x80) |
| 10588 | mstore(0x40, p1) |
| 10589 | mstore(0x60, p2) |
| 10590 | mstore(0x80, p3) |
| 10591 | writeString(0xa0, p0) |
| 10592 | } |
| 10593 | _sendLogPayload(0x1c, 0xc4); |
| 10594 | assembly ("memory-safe") { |
| 10595 | mstore(0x00, m0) |
| 10596 | mstore(0x20, m1) |
| 10597 | mstore(0x40, m2) |
| 10598 | mstore(0x60, m3) |
| 10599 | mstore(0x80, m4) |
| 10600 | mstore(0xa0, m5) |
| 10601 | mstore(0xc0, m6) |
| 10602 | } |
| 10603 | } |
| 10604 | |
| 10605 | function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure { |
| 10606 | bytes32 m0; |
| 10607 | bytes32 m1; |
| 10608 | bytes32 m2; |
| 10609 | bytes32 m3; |
| 10610 | bytes32 m4; |
| 10611 | bytes32 m5; |
| 10612 | bytes32 m6; |
| 10613 | assembly ("memory-safe") { |
| 10614 | function writeString(pos, w) { |
| 10615 | let length := 0 |
| 10616 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10617 | mstore(pos, length) |
| 10618 | let shift := sub(256, shl(3, length)) |
| 10619 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10620 | } |
| 10621 | m0 := mload(0x00) |
| 10622 | m1 := mload(0x20) |
| 10623 | m2 := mload(0x40) |
| 10624 | m3 := mload(0x60) |
| 10625 | m4 := mload(0x80) |
| 10626 | m5 := mload(0xa0) |
| 10627 | m6 := mload(0xc0) |
| 10628 | // Selector of `log(string,address,uint256,uint256)`. |
| 10629 | mstore(0x00, 0xf8f51b1e) |
| 10630 | mstore(0x20, 0x80) |
| 10631 | mstore(0x40, p1) |
| 10632 | mstore(0x60, p2) |
| 10633 | mstore(0x80, p3) |
| 10634 | writeString(0xa0, p0) |
| 10635 | } |
| 10636 | _sendLogPayload(0x1c, 0xc4); |
| 10637 | assembly ("memory-safe") { |
| 10638 | mstore(0x00, m0) |
| 10639 | mstore(0x20, m1) |
| 10640 | mstore(0x40, m2) |
| 10641 | mstore(0x60, m3) |
| 10642 | mstore(0x80, m4) |
| 10643 | mstore(0xa0, m5) |
| 10644 | mstore(0xc0, m6) |
| 10645 | } |
| 10646 | } |
| 10647 | |
| 10648 | function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure { |
| 10649 | bytes32 m0; |
| 10650 | bytes32 m1; |
| 10651 | bytes32 m2; |
| 10652 | bytes32 m3; |
| 10653 | bytes32 m4; |
| 10654 | bytes32 m5; |
| 10655 | bytes32 m6; |
| 10656 | bytes32 m7; |
| 10657 | bytes32 m8; |
| 10658 | assembly ("memory-safe") { |
| 10659 | function writeString(pos, w) { |
| 10660 | let length := 0 |
| 10661 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10662 | mstore(pos, length) |
| 10663 | let shift := sub(256, shl(3, length)) |
| 10664 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10665 | } |
| 10666 | m0 := mload(0x00) |
| 10667 | m1 := mload(0x20) |
| 10668 | m2 := mload(0x40) |
| 10669 | m3 := mload(0x60) |
| 10670 | m4 := mload(0x80) |
| 10671 | m5 := mload(0xa0) |
| 10672 | m6 := mload(0xc0) |
| 10673 | m7 := mload(0xe0) |
| 10674 | m8 := mload(0x100) |
| 10675 | // Selector of `log(string,address,uint256,string)`. |
| 10676 | mstore(0x00, 0x5a477632) |
| 10677 | mstore(0x20, 0x80) |
| 10678 | mstore(0x40, p1) |
| 10679 | mstore(0x60, p2) |
| 10680 | mstore(0x80, 0xc0) |
| 10681 | writeString(0xa0, p0) |
| 10682 | writeString(0xe0, p3) |
| 10683 | } |
| 10684 | _sendLogPayload(0x1c, 0x104); |
| 10685 | assembly ("memory-safe") { |
| 10686 | mstore(0x00, m0) |
| 10687 | mstore(0x20, m1) |
| 10688 | mstore(0x40, m2) |
| 10689 | mstore(0x60, m3) |
| 10690 | mstore(0x80, m4) |
| 10691 | mstore(0xa0, m5) |
| 10692 | mstore(0xc0, m6) |
| 10693 | mstore(0xe0, m7) |
| 10694 | mstore(0x100, m8) |
| 10695 | } |
| 10696 | } |
| 10697 | |
| 10698 | function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure { |
| 10699 | bytes32 m0; |
| 10700 | bytes32 m1; |
| 10701 | bytes32 m2; |
| 10702 | bytes32 m3; |
| 10703 | bytes32 m4; |
| 10704 | bytes32 m5; |
| 10705 | bytes32 m6; |
| 10706 | bytes32 m7; |
| 10707 | bytes32 m8; |
| 10708 | assembly ("memory-safe") { |
| 10709 | function writeString(pos, w) { |
| 10710 | let length := 0 |
| 10711 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10712 | mstore(pos, length) |
| 10713 | let shift := sub(256, shl(3, length)) |
| 10714 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10715 | } |
| 10716 | m0 := mload(0x00) |
| 10717 | m1 := mload(0x20) |
| 10718 | m2 := mload(0x40) |
| 10719 | m3 := mload(0x60) |
| 10720 | m4 := mload(0x80) |
| 10721 | m5 := mload(0xa0) |
| 10722 | m6 := mload(0xc0) |
| 10723 | m7 := mload(0xe0) |
| 10724 | m8 := mload(0x100) |
| 10725 | // Selector of `log(string,address,string,address)`. |
| 10726 | mstore(0x00, 0xaabc9a31) |
| 10727 | mstore(0x20, 0x80) |
| 10728 | mstore(0x40, p1) |
| 10729 | mstore(0x60, 0xc0) |
| 10730 | mstore(0x80, p3) |
| 10731 | writeString(0xa0, p0) |
| 10732 | writeString(0xe0, p2) |
| 10733 | } |
| 10734 | _sendLogPayload(0x1c, 0x104); |
| 10735 | assembly ("memory-safe") { |
| 10736 | mstore(0x00, m0) |
| 10737 | mstore(0x20, m1) |
| 10738 | mstore(0x40, m2) |
| 10739 | mstore(0x60, m3) |
| 10740 | mstore(0x80, m4) |
| 10741 | mstore(0xa0, m5) |
| 10742 | mstore(0xc0, m6) |
| 10743 | mstore(0xe0, m7) |
| 10744 | mstore(0x100, m8) |
| 10745 | } |
| 10746 | } |
| 10747 | |
| 10748 | function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure { |
| 10749 | bytes32 m0; |
| 10750 | bytes32 m1; |
| 10751 | bytes32 m2; |
| 10752 | bytes32 m3; |
| 10753 | bytes32 m4; |
| 10754 | bytes32 m5; |
| 10755 | bytes32 m6; |
| 10756 | bytes32 m7; |
| 10757 | bytes32 m8; |
| 10758 | assembly ("memory-safe") { |
| 10759 | function writeString(pos, w) { |
| 10760 | let length := 0 |
| 10761 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10762 | mstore(pos, length) |
| 10763 | let shift := sub(256, shl(3, length)) |
| 10764 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10765 | } |
| 10766 | m0 := mload(0x00) |
| 10767 | m1 := mload(0x20) |
| 10768 | m2 := mload(0x40) |
| 10769 | m3 := mload(0x60) |
| 10770 | m4 := mload(0x80) |
| 10771 | m5 := mload(0xa0) |
| 10772 | m6 := mload(0xc0) |
| 10773 | m7 := mload(0xe0) |
| 10774 | m8 := mload(0x100) |
| 10775 | // Selector of `log(string,address,string,bool)`. |
| 10776 | mstore(0x00, 0x5f15d28c) |
| 10777 | mstore(0x20, 0x80) |
| 10778 | mstore(0x40, p1) |
| 10779 | mstore(0x60, 0xc0) |
| 10780 | mstore(0x80, p3) |
| 10781 | writeString(0xa0, p0) |
| 10782 | writeString(0xe0, p2) |
| 10783 | } |
| 10784 | _sendLogPayload(0x1c, 0x104); |
| 10785 | assembly ("memory-safe") { |
| 10786 | mstore(0x00, m0) |
| 10787 | mstore(0x20, m1) |
| 10788 | mstore(0x40, m2) |
| 10789 | mstore(0x60, m3) |
| 10790 | mstore(0x80, m4) |
| 10791 | mstore(0xa0, m5) |
| 10792 | mstore(0xc0, m6) |
| 10793 | mstore(0xe0, m7) |
| 10794 | mstore(0x100, m8) |
| 10795 | } |
| 10796 | } |
| 10797 | |
| 10798 | function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure { |
| 10799 | bytes32 m0; |
| 10800 | bytes32 m1; |
| 10801 | bytes32 m2; |
| 10802 | bytes32 m3; |
| 10803 | bytes32 m4; |
| 10804 | bytes32 m5; |
| 10805 | bytes32 m6; |
| 10806 | bytes32 m7; |
| 10807 | bytes32 m8; |
| 10808 | assembly ("memory-safe") { |
| 10809 | function writeString(pos, w) { |
| 10810 | let length := 0 |
| 10811 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10812 | mstore(pos, length) |
| 10813 | let shift := sub(256, shl(3, length)) |
| 10814 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10815 | } |
| 10816 | m0 := mload(0x00) |
| 10817 | m1 := mload(0x20) |
| 10818 | m2 := mload(0x40) |
| 10819 | m3 := mload(0x60) |
| 10820 | m4 := mload(0x80) |
| 10821 | m5 := mload(0xa0) |
| 10822 | m6 := mload(0xc0) |
| 10823 | m7 := mload(0xe0) |
| 10824 | m8 := mload(0x100) |
| 10825 | // Selector of `log(string,address,string,uint256)`. |
| 10826 | mstore(0x00, 0x91d1112e) |
| 10827 | mstore(0x20, 0x80) |
| 10828 | mstore(0x40, p1) |
| 10829 | mstore(0x60, 0xc0) |
| 10830 | mstore(0x80, p3) |
| 10831 | writeString(0xa0, p0) |
| 10832 | writeString(0xe0, p2) |
| 10833 | } |
| 10834 | _sendLogPayload(0x1c, 0x104); |
| 10835 | assembly ("memory-safe") { |
| 10836 | mstore(0x00, m0) |
| 10837 | mstore(0x20, m1) |
| 10838 | mstore(0x40, m2) |
| 10839 | mstore(0x60, m3) |
| 10840 | mstore(0x80, m4) |
| 10841 | mstore(0xa0, m5) |
| 10842 | mstore(0xc0, m6) |
| 10843 | mstore(0xe0, m7) |
| 10844 | mstore(0x100, m8) |
| 10845 | } |
| 10846 | } |
| 10847 | |
| 10848 | function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure { |
| 10849 | bytes32 m0; |
| 10850 | bytes32 m1; |
| 10851 | bytes32 m2; |
| 10852 | bytes32 m3; |
| 10853 | bytes32 m4; |
| 10854 | bytes32 m5; |
| 10855 | bytes32 m6; |
| 10856 | bytes32 m7; |
| 10857 | bytes32 m8; |
| 10858 | bytes32 m9; |
| 10859 | bytes32 m10; |
| 10860 | assembly ("memory-safe") { |
| 10861 | function writeString(pos, w) { |
| 10862 | let length := 0 |
| 10863 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10864 | mstore(pos, length) |
| 10865 | let shift := sub(256, shl(3, length)) |
| 10866 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10867 | } |
| 10868 | m0 := mload(0x00) |
| 10869 | m1 := mload(0x20) |
| 10870 | m2 := mload(0x40) |
| 10871 | m3 := mload(0x60) |
| 10872 | m4 := mload(0x80) |
| 10873 | m5 := mload(0xa0) |
| 10874 | m6 := mload(0xc0) |
| 10875 | m7 := mload(0xe0) |
| 10876 | m8 := mload(0x100) |
| 10877 | m9 := mload(0x120) |
| 10878 | m10 := mload(0x140) |
| 10879 | // Selector of `log(string,address,string,string)`. |
| 10880 | mstore(0x00, 0x245986f2) |
| 10881 | mstore(0x20, 0x80) |
| 10882 | mstore(0x40, p1) |
| 10883 | mstore(0x60, 0xc0) |
| 10884 | mstore(0x80, 0x100) |
| 10885 | writeString(0xa0, p0) |
| 10886 | writeString(0xe0, p2) |
| 10887 | writeString(0x120, p3) |
| 10888 | } |
| 10889 | _sendLogPayload(0x1c, 0x144); |
| 10890 | assembly ("memory-safe") { |
| 10891 | mstore(0x00, m0) |
| 10892 | mstore(0x20, m1) |
| 10893 | mstore(0x40, m2) |
| 10894 | mstore(0x60, m3) |
| 10895 | mstore(0x80, m4) |
| 10896 | mstore(0xa0, m5) |
| 10897 | mstore(0xc0, m6) |
| 10898 | mstore(0xe0, m7) |
| 10899 | mstore(0x100, m8) |
| 10900 | mstore(0x120, m9) |
| 10901 | mstore(0x140, m10) |
| 10902 | } |
| 10903 | } |
| 10904 | |
| 10905 | function log(bytes32 p0, bool p1, address p2, address p3) internal pure { |
| 10906 | bytes32 m0; |
| 10907 | bytes32 m1; |
| 10908 | bytes32 m2; |
| 10909 | bytes32 m3; |
| 10910 | bytes32 m4; |
| 10911 | bytes32 m5; |
| 10912 | bytes32 m6; |
| 10913 | assembly ("memory-safe") { |
| 10914 | function writeString(pos, w) { |
| 10915 | let length := 0 |
| 10916 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10917 | mstore(pos, length) |
| 10918 | let shift := sub(256, shl(3, length)) |
| 10919 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10920 | } |
| 10921 | m0 := mload(0x00) |
| 10922 | m1 := mload(0x20) |
| 10923 | m2 := mload(0x40) |
| 10924 | m3 := mload(0x60) |
| 10925 | m4 := mload(0x80) |
| 10926 | m5 := mload(0xa0) |
| 10927 | m6 := mload(0xc0) |
| 10928 | // Selector of `log(string,bool,address,address)`. |
| 10929 | mstore(0x00, 0x33e9dd1d) |
| 10930 | mstore(0x20, 0x80) |
| 10931 | mstore(0x40, p1) |
| 10932 | mstore(0x60, p2) |
| 10933 | mstore(0x80, p3) |
| 10934 | writeString(0xa0, p0) |
| 10935 | } |
| 10936 | _sendLogPayload(0x1c, 0xc4); |
| 10937 | assembly ("memory-safe") { |
| 10938 | mstore(0x00, m0) |
| 10939 | mstore(0x20, m1) |
| 10940 | mstore(0x40, m2) |
| 10941 | mstore(0x60, m3) |
| 10942 | mstore(0x80, m4) |
| 10943 | mstore(0xa0, m5) |
| 10944 | mstore(0xc0, m6) |
| 10945 | } |
| 10946 | } |
| 10947 | |
| 10948 | function log(bytes32 p0, bool p1, address p2, bool p3) internal pure { |
| 10949 | bytes32 m0; |
| 10950 | bytes32 m1; |
| 10951 | bytes32 m2; |
| 10952 | bytes32 m3; |
| 10953 | bytes32 m4; |
| 10954 | bytes32 m5; |
| 10955 | bytes32 m6; |
| 10956 | assembly ("memory-safe") { |
| 10957 | function writeString(pos, w) { |
| 10958 | let length := 0 |
| 10959 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 10960 | mstore(pos, length) |
| 10961 | let shift := sub(256, shl(3, length)) |
| 10962 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 10963 | } |
| 10964 | m0 := mload(0x00) |
| 10965 | m1 := mload(0x20) |
| 10966 | m2 := mload(0x40) |
| 10967 | m3 := mload(0x60) |
| 10968 | m4 := mload(0x80) |
| 10969 | m5 := mload(0xa0) |
| 10970 | m6 := mload(0xc0) |
| 10971 | // Selector of `log(string,bool,address,bool)`. |
| 10972 | mstore(0x00, 0x958c28c6) |
| 10973 | mstore(0x20, 0x80) |
| 10974 | mstore(0x40, p1) |
| 10975 | mstore(0x60, p2) |
| 10976 | mstore(0x80, p3) |
| 10977 | writeString(0xa0, p0) |
| 10978 | } |
| 10979 | _sendLogPayload(0x1c, 0xc4); |
| 10980 | assembly ("memory-safe") { |
| 10981 | mstore(0x00, m0) |
| 10982 | mstore(0x20, m1) |
| 10983 | mstore(0x40, m2) |
| 10984 | mstore(0x60, m3) |
| 10985 | mstore(0x80, m4) |
| 10986 | mstore(0xa0, m5) |
| 10987 | mstore(0xc0, m6) |
| 10988 | } |
| 10989 | } |
| 10990 | |
| 10991 | function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure { |
| 10992 | bytes32 m0; |
| 10993 | bytes32 m1; |
| 10994 | bytes32 m2; |
| 10995 | bytes32 m3; |
| 10996 | bytes32 m4; |
| 10997 | bytes32 m5; |
| 10998 | bytes32 m6; |
| 10999 | assembly ("memory-safe") { |
| 11000 | function writeString(pos, w) { |
| 11001 | let length := 0 |
| 11002 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11003 | mstore(pos, length) |
| 11004 | let shift := sub(256, shl(3, length)) |
| 11005 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11006 | } |
| 11007 | m0 := mload(0x00) |
| 11008 | m1 := mload(0x20) |
| 11009 | m2 := mload(0x40) |
| 11010 | m3 := mload(0x60) |
| 11011 | m4 := mload(0x80) |
| 11012 | m5 := mload(0xa0) |
| 11013 | m6 := mload(0xc0) |
| 11014 | // Selector of `log(string,bool,address,uint256)`. |
| 11015 | mstore(0x00, 0x5d08bb05) |
| 11016 | mstore(0x20, 0x80) |
| 11017 | mstore(0x40, p1) |
| 11018 | mstore(0x60, p2) |
| 11019 | mstore(0x80, p3) |
| 11020 | writeString(0xa0, p0) |
| 11021 | } |
| 11022 | _sendLogPayload(0x1c, 0xc4); |
| 11023 | assembly ("memory-safe") { |
| 11024 | mstore(0x00, m0) |
| 11025 | mstore(0x20, m1) |
| 11026 | mstore(0x40, m2) |
| 11027 | mstore(0x60, m3) |
| 11028 | mstore(0x80, m4) |
| 11029 | mstore(0xa0, m5) |
| 11030 | mstore(0xc0, m6) |
| 11031 | } |
| 11032 | } |
| 11033 | |
| 11034 | function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure { |
| 11035 | bytes32 m0; |
| 11036 | bytes32 m1; |
| 11037 | bytes32 m2; |
| 11038 | bytes32 m3; |
| 11039 | bytes32 m4; |
| 11040 | bytes32 m5; |
| 11041 | bytes32 m6; |
| 11042 | bytes32 m7; |
| 11043 | bytes32 m8; |
| 11044 | assembly ("memory-safe") { |
| 11045 | function writeString(pos, w) { |
| 11046 | let length := 0 |
| 11047 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11048 | mstore(pos, length) |
| 11049 | let shift := sub(256, shl(3, length)) |
| 11050 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11051 | } |
| 11052 | m0 := mload(0x00) |
| 11053 | m1 := mload(0x20) |
| 11054 | m2 := mload(0x40) |
| 11055 | m3 := mload(0x60) |
| 11056 | m4 := mload(0x80) |
| 11057 | m5 := mload(0xa0) |
| 11058 | m6 := mload(0xc0) |
| 11059 | m7 := mload(0xe0) |
| 11060 | m8 := mload(0x100) |
| 11061 | // Selector of `log(string,bool,address,string)`. |
| 11062 | mstore(0x00, 0x2d8e33a4) |
| 11063 | mstore(0x20, 0x80) |
| 11064 | mstore(0x40, p1) |
| 11065 | mstore(0x60, p2) |
| 11066 | mstore(0x80, 0xc0) |
| 11067 | writeString(0xa0, p0) |
| 11068 | writeString(0xe0, p3) |
| 11069 | } |
| 11070 | _sendLogPayload(0x1c, 0x104); |
| 11071 | assembly ("memory-safe") { |
| 11072 | mstore(0x00, m0) |
| 11073 | mstore(0x20, m1) |
| 11074 | mstore(0x40, m2) |
| 11075 | mstore(0x60, m3) |
| 11076 | mstore(0x80, m4) |
| 11077 | mstore(0xa0, m5) |
| 11078 | mstore(0xc0, m6) |
| 11079 | mstore(0xe0, m7) |
| 11080 | mstore(0x100, m8) |
| 11081 | } |
| 11082 | } |
| 11083 | |
| 11084 | function log(bytes32 p0, bool p1, bool p2, address p3) internal pure { |
| 11085 | bytes32 m0; |
| 11086 | bytes32 m1; |
| 11087 | bytes32 m2; |
| 11088 | bytes32 m3; |
| 11089 | bytes32 m4; |
| 11090 | bytes32 m5; |
| 11091 | bytes32 m6; |
| 11092 | assembly ("memory-safe") { |
| 11093 | function writeString(pos, w) { |
| 11094 | let length := 0 |
| 11095 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11096 | mstore(pos, length) |
| 11097 | let shift := sub(256, shl(3, length)) |
| 11098 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11099 | } |
| 11100 | m0 := mload(0x00) |
| 11101 | m1 := mload(0x20) |
| 11102 | m2 := mload(0x40) |
| 11103 | m3 := mload(0x60) |
| 11104 | m4 := mload(0x80) |
| 11105 | m5 := mload(0xa0) |
| 11106 | m6 := mload(0xc0) |
| 11107 | // Selector of `log(string,bool,bool,address)`. |
| 11108 | mstore(0x00, 0x7190a529) |
| 11109 | mstore(0x20, 0x80) |
| 11110 | mstore(0x40, p1) |
| 11111 | mstore(0x60, p2) |
| 11112 | mstore(0x80, p3) |
| 11113 | writeString(0xa0, p0) |
| 11114 | } |
| 11115 | _sendLogPayload(0x1c, 0xc4); |
| 11116 | assembly ("memory-safe") { |
| 11117 | mstore(0x00, m0) |
| 11118 | mstore(0x20, m1) |
| 11119 | mstore(0x40, m2) |
| 11120 | mstore(0x60, m3) |
| 11121 | mstore(0x80, m4) |
| 11122 | mstore(0xa0, m5) |
| 11123 | mstore(0xc0, m6) |
| 11124 | } |
| 11125 | } |
| 11126 | |
| 11127 | function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure { |
| 11128 | bytes32 m0; |
| 11129 | bytes32 m1; |
| 11130 | bytes32 m2; |
| 11131 | bytes32 m3; |
| 11132 | bytes32 m4; |
| 11133 | bytes32 m5; |
| 11134 | bytes32 m6; |
| 11135 | assembly ("memory-safe") { |
| 11136 | function writeString(pos, w) { |
| 11137 | let length := 0 |
| 11138 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11139 | mstore(pos, length) |
| 11140 | let shift := sub(256, shl(3, length)) |
| 11141 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11142 | } |
| 11143 | m0 := mload(0x00) |
| 11144 | m1 := mload(0x20) |
| 11145 | m2 := mload(0x40) |
| 11146 | m3 := mload(0x60) |
| 11147 | m4 := mload(0x80) |
| 11148 | m5 := mload(0xa0) |
| 11149 | m6 := mload(0xc0) |
| 11150 | // Selector of `log(string,bool,bool,bool)`. |
| 11151 | mstore(0x00, 0x895af8c5) |
| 11152 | mstore(0x20, 0x80) |
| 11153 | mstore(0x40, p1) |
| 11154 | mstore(0x60, p2) |
| 11155 | mstore(0x80, p3) |
| 11156 | writeString(0xa0, p0) |
| 11157 | } |
| 11158 | _sendLogPayload(0x1c, 0xc4); |
| 11159 | assembly ("memory-safe") { |
| 11160 | mstore(0x00, m0) |
| 11161 | mstore(0x20, m1) |
| 11162 | mstore(0x40, m2) |
| 11163 | mstore(0x60, m3) |
| 11164 | mstore(0x80, m4) |
| 11165 | mstore(0xa0, m5) |
| 11166 | mstore(0xc0, m6) |
| 11167 | } |
| 11168 | } |
| 11169 | |
| 11170 | function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure { |
| 11171 | bytes32 m0; |
| 11172 | bytes32 m1; |
| 11173 | bytes32 m2; |
| 11174 | bytes32 m3; |
| 11175 | bytes32 m4; |
| 11176 | bytes32 m5; |
| 11177 | bytes32 m6; |
| 11178 | assembly ("memory-safe") { |
| 11179 | function writeString(pos, w) { |
| 11180 | let length := 0 |
| 11181 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11182 | mstore(pos, length) |
| 11183 | let shift := sub(256, shl(3, length)) |
| 11184 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11185 | } |
| 11186 | m0 := mload(0x00) |
| 11187 | m1 := mload(0x20) |
| 11188 | m2 := mload(0x40) |
| 11189 | m3 := mload(0x60) |
| 11190 | m4 := mload(0x80) |
| 11191 | m5 := mload(0xa0) |
| 11192 | m6 := mload(0xc0) |
| 11193 | // Selector of `log(string,bool,bool,uint256)`. |
| 11194 | mstore(0x00, 0x8e3f78a9) |
| 11195 | mstore(0x20, 0x80) |
| 11196 | mstore(0x40, p1) |
| 11197 | mstore(0x60, p2) |
| 11198 | mstore(0x80, p3) |
| 11199 | writeString(0xa0, p0) |
| 11200 | } |
| 11201 | _sendLogPayload(0x1c, 0xc4); |
| 11202 | assembly ("memory-safe") { |
| 11203 | mstore(0x00, m0) |
| 11204 | mstore(0x20, m1) |
| 11205 | mstore(0x40, m2) |
| 11206 | mstore(0x60, m3) |
| 11207 | mstore(0x80, m4) |
| 11208 | mstore(0xa0, m5) |
| 11209 | mstore(0xc0, m6) |
| 11210 | } |
| 11211 | } |
| 11212 | |
| 11213 | function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure { |
| 11214 | bytes32 m0; |
| 11215 | bytes32 m1; |
| 11216 | bytes32 m2; |
| 11217 | bytes32 m3; |
| 11218 | bytes32 m4; |
| 11219 | bytes32 m5; |
| 11220 | bytes32 m6; |
| 11221 | bytes32 m7; |
| 11222 | bytes32 m8; |
| 11223 | assembly ("memory-safe") { |
| 11224 | function writeString(pos, w) { |
| 11225 | let length := 0 |
| 11226 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11227 | mstore(pos, length) |
| 11228 | let shift := sub(256, shl(3, length)) |
| 11229 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11230 | } |
| 11231 | m0 := mload(0x00) |
| 11232 | m1 := mload(0x20) |
| 11233 | m2 := mload(0x40) |
| 11234 | m3 := mload(0x60) |
| 11235 | m4 := mload(0x80) |
| 11236 | m5 := mload(0xa0) |
| 11237 | m6 := mload(0xc0) |
| 11238 | m7 := mload(0xe0) |
| 11239 | m8 := mload(0x100) |
| 11240 | // Selector of `log(string,bool,bool,string)`. |
| 11241 | mstore(0x00, 0x9d22d5dd) |
| 11242 | mstore(0x20, 0x80) |
| 11243 | mstore(0x40, p1) |
| 11244 | mstore(0x60, p2) |
| 11245 | mstore(0x80, 0xc0) |
| 11246 | writeString(0xa0, p0) |
| 11247 | writeString(0xe0, p3) |
| 11248 | } |
| 11249 | _sendLogPayload(0x1c, 0x104); |
| 11250 | assembly ("memory-safe") { |
| 11251 | mstore(0x00, m0) |
| 11252 | mstore(0x20, m1) |
| 11253 | mstore(0x40, m2) |
| 11254 | mstore(0x60, m3) |
| 11255 | mstore(0x80, m4) |
| 11256 | mstore(0xa0, m5) |
| 11257 | mstore(0xc0, m6) |
| 11258 | mstore(0xe0, m7) |
| 11259 | mstore(0x100, m8) |
| 11260 | } |
| 11261 | } |
| 11262 | |
| 11263 | function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure { |
| 11264 | bytes32 m0; |
| 11265 | bytes32 m1; |
| 11266 | bytes32 m2; |
| 11267 | bytes32 m3; |
| 11268 | bytes32 m4; |
| 11269 | bytes32 m5; |
| 11270 | bytes32 m6; |
| 11271 | assembly ("memory-safe") { |
| 11272 | function writeString(pos, w) { |
| 11273 | let length := 0 |
| 11274 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11275 | mstore(pos, length) |
| 11276 | let shift := sub(256, shl(3, length)) |
| 11277 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11278 | } |
| 11279 | m0 := mload(0x00) |
| 11280 | m1 := mload(0x20) |
| 11281 | m2 := mload(0x40) |
| 11282 | m3 := mload(0x60) |
| 11283 | m4 := mload(0x80) |
| 11284 | m5 := mload(0xa0) |
| 11285 | m6 := mload(0xc0) |
| 11286 | // Selector of `log(string,bool,uint256,address)`. |
| 11287 | mstore(0x00, 0x935e09bf) |
| 11288 | mstore(0x20, 0x80) |
| 11289 | mstore(0x40, p1) |
| 11290 | mstore(0x60, p2) |
| 11291 | mstore(0x80, p3) |
| 11292 | writeString(0xa0, p0) |
| 11293 | } |
| 11294 | _sendLogPayload(0x1c, 0xc4); |
| 11295 | assembly ("memory-safe") { |
| 11296 | mstore(0x00, m0) |
| 11297 | mstore(0x20, m1) |
| 11298 | mstore(0x40, m2) |
| 11299 | mstore(0x60, m3) |
| 11300 | mstore(0x80, m4) |
| 11301 | mstore(0xa0, m5) |
| 11302 | mstore(0xc0, m6) |
| 11303 | } |
| 11304 | } |
| 11305 | |
| 11306 | function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure { |
| 11307 | bytes32 m0; |
| 11308 | bytes32 m1; |
| 11309 | bytes32 m2; |
| 11310 | bytes32 m3; |
| 11311 | bytes32 m4; |
| 11312 | bytes32 m5; |
| 11313 | bytes32 m6; |
| 11314 | assembly ("memory-safe") { |
| 11315 | function writeString(pos, w) { |
| 11316 | let length := 0 |
| 11317 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11318 | mstore(pos, length) |
| 11319 | let shift := sub(256, shl(3, length)) |
| 11320 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11321 | } |
| 11322 | m0 := mload(0x00) |
| 11323 | m1 := mload(0x20) |
| 11324 | m2 := mload(0x40) |
| 11325 | m3 := mload(0x60) |
| 11326 | m4 := mload(0x80) |
| 11327 | m5 := mload(0xa0) |
| 11328 | m6 := mload(0xc0) |
| 11329 | // Selector of `log(string,bool,uint256,bool)`. |
| 11330 | mstore(0x00, 0x8af7cf8a) |
| 11331 | mstore(0x20, 0x80) |
| 11332 | mstore(0x40, p1) |
| 11333 | mstore(0x60, p2) |
| 11334 | mstore(0x80, p3) |
| 11335 | writeString(0xa0, p0) |
| 11336 | } |
| 11337 | _sendLogPayload(0x1c, 0xc4); |
| 11338 | assembly ("memory-safe") { |
| 11339 | mstore(0x00, m0) |
| 11340 | mstore(0x20, m1) |
| 11341 | mstore(0x40, m2) |
| 11342 | mstore(0x60, m3) |
| 11343 | mstore(0x80, m4) |
| 11344 | mstore(0xa0, m5) |
| 11345 | mstore(0xc0, m6) |
| 11346 | } |
| 11347 | } |
| 11348 | |
| 11349 | function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure { |
| 11350 | bytes32 m0; |
| 11351 | bytes32 m1; |
| 11352 | bytes32 m2; |
| 11353 | bytes32 m3; |
| 11354 | bytes32 m4; |
| 11355 | bytes32 m5; |
| 11356 | bytes32 m6; |
| 11357 | assembly ("memory-safe") { |
| 11358 | function writeString(pos, w) { |
| 11359 | let length := 0 |
| 11360 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11361 | mstore(pos, length) |
| 11362 | let shift := sub(256, shl(3, length)) |
| 11363 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11364 | } |
| 11365 | m0 := mload(0x00) |
| 11366 | m1 := mload(0x20) |
| 11367 | m2 := mload(0x40) |
| 11368 | m3 := mload(0x60) |
| 11369 | m4 := mload(0x80) |
| 11370 | m5 := mload(0xa0) |
| 11371 | m6 := mload(0xc0) |
| 11372 | // Selector of `log(string,bool,uint256,uint256)`. |
| 11373 | mstore(0x00, 0x64b5bb67) |
| 11374 | mstore(0x20, 0x80) |
| 11375 | mstore(0x40, p1) |
| 11376 | mstore(0x60, p2) |
| 11377 | mstore(0x80, p3) |
| 11378 | writeString(0xa0, p0) |
| 11379 | } |
| 11380 | _sendLogPayload(0x1c, 0xc4); |
| 11381 | assembly ("memory-safe") { |
| 11382 | mstore(0x00, m0) |
| 11383 | mstore(0x20, m1) |
| 11384 | mstore(0x40, m2) |
| 11385 | mstore(0x60, m3) |
| 11386 | mstore(0x80, m4) |
| 11387 | mstore(0xa0, m5) |
| 11388 | mstore(0xc0, m6) |
| 11389 | } |
| 11390 | } |
| 11391 | |
| 11392 | function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure { |
| 11393 | bytes32 m0; |
| 11394 | bytes32 m1; |
| 11395 | bytes32 m2; |
| 11396 | bytes32 m3; |
| 11397 | bytes32 m4; |
| 11398 | bytes32 m5; |
| 11399 | bytes32 m6; |
| 11400 | bytes32 m7; |
| 11401 | bytes32 m8; |
| 11402 | assembly ("memory-safe") { |
| 11403 | function writeString(pos, w) { |
| 11404 | let length := 0 |
| 11405 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11406 | mstore(pos, length) |
| 11407 | let shift := sub(256, shl(3, length)) |
| 11408 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11409 | } |
| 11410 | m0 := mload(0x00) |
| 11411 | m1 := mload(0x20) |
| 11412 | m2 := mload(0x40) |
| 11413 | m3 := mload(0x60) |
| 11414 | m4 := mload(0x80) |
| 11415 | m5 := mload(0xa0) |
| 11416 | m6 := mload(0xc0) |
| 11417 | m7 := mload(0xe0) |
| 11418 | m8 := mload(0x100) |
| 11419 | // Selector of `log(string,bool,uint256,string)`. |
| 11420 | mstore(0x00, 0x742d6ee7) |
| 11421 | mstore(0x20, 0x80) |
| 11422 | mstore(0x40, p1) |
| 11423 | mstore(0x60, p2) |
| 11424 | mstore(0x80, 0xc0) |
| 11425 | writeString(0xa0, p0) |
| 11426 | writeString(0xe0, p3) |
| 11427 | } |
| 11428 | _sendLogPayload(0x1c, 0x104); |
| 11429 | assembly ("memory-safe") { |
| 11430 | mstore(0x00, m0) |
| 11431 | mstore(0x20, m1) |
| 11432 | mstore(0x40, m2) |
| 11433 | mstore(0x60, m3) |
| 11434 | mstore(0x80, m4) |
| 11435 | mstore(0xa0, m5) |
| 11436 | mstore(0xc0, m6) |
| 11437 | mstore(0xe0, m7) |
| 11438 | mstore(0x100, m8) |
| 11439 | } |
| 11440 | } |
| 11441 | |
| 11442 | function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure { |
| 11443 | bytes32 m0; |
| 11444 | bytes32 m1; |
| 11445 | bytes32 m2; |
| 11446 | bytes32 m3; |
| 11447 | bytes32 m4; |
| 11448 | bytes32 m5; |
| 11449 | bytes32 m6; |
| 11450 | bytes32 m7; |
| 11451 | bytes32 m8; |
| 11452 | assembly ("memory-safe") { |
| 11453 | function writeString(pos, w) { |
| 11454 | let length := 0 |
| 11455 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11456 | mstore(pos, length) |
| 11457 | let shift := sub(256, shl(3, length)) |
| 11458 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11459 | } |
| 11460 | m0 := mload(0x00) |
| 11461 | m1 := mload(0x20) |
| 11462 | m2 := mload(0x40) |
| 11463 | m3 := mload(0x60) |
| 11464 | m4 := mload(0x80) |
| 11465 | m5 := mload(0xa0) |
| 11466 | m6 := mload(0xc0) |
| 11467 | m7 := mload(0xe0) |
| 11468 | m8 := mload(0x100) |
| 11469 | // Selector of `log(string,bool,string,address)`. |
| 11470 | mstore(0x00, 0xe0625b29) |
| 11471 | mstore(0x20, 0x80) |
| 11472 | mstore(0x40, p1) |
| 11473 | mstore(0x60, 0xc0) |
| 11474 | mstore(0x80, p3) |
| 11475 | writeString(0xa0, p0) |
| 11476 | writeString(0xe0, p2) |
| 11477 | } |
| 11478 | _sendLogPayload(0x1c, 0x104); |
| 11479 | assembly ("memory-safe") { |
| 11480 | mstore(0x00, m0) |
| 11481 | mstore(0x20, m1) |
| 11482 | mstore(0x40, m2) |
| 11483 | mstore(0x60, m3) |
| 11484 | mstore(0x80, m4) |
| 11485 | mstore(0xa0, m5) |
| 11486 | mstore(0xc0, m6) |
| 11487 | mstore(0xe0, m7) |
| 11488 | mstore(0x100, m8) |
| 11489 | } |
| 11490 | } |
| 11491 | |
| 11492 | function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure { |
| 11493 | bytes32 m0; |
| 11494 | bytes32 m1; |
| 11495 | bytes32 m2; |
| 11496 | bytes32 m3; |
| 11497 | bytes32 m4; |
| 11498 | bytes32 m5; |
| 11499 | bytes32 m6; |
| 11500 | bytes32 m7; |
| 11501 | bytes32 m8; |
| 11502 | assembly ("memory-safe") { |
| 11503 | function writeString(pos, w) { |
| 11504 | let length := 0 |
| 11505 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11506 | mstore(pos, length) |
| 11507 | let shift := sub(256, shl(3, length)) |
| 11508 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11509 | } |
| 11510 | m0 := mload(0x00) |
| 11511 | m1 := mload(0x20) |
| 11512 | m2 := mload(0x40) |
| 11513 | m3 := mload(0x60) |
| 11514 | m4 := mload(0x80) |
| 11515 | m5 := mload(0xa0) |
| 11516 | m6 := mload(0xc0) |
| 11517 | m7 := mload(0xe0) |
| 11518 | m8 := mload(0x100) |
| 11519 | // Selector of `log(string,bool,string,bool)`. |
| 11520 | mstore(0x00, 0x3f8a701d) |
| 11521 | mstore(0x20, 0x80) |
| 11522 | mstore(0x40, p1) |
| 11523 | mstore(0x60, 0xc0) |
| 11524 | mstore(0x80, p3) |
| 11525 | writeString(0xa0, p0) |
| 11526 | writeString(0xe0, p2) |
| 11527 | } |
| 11528 | _sendLogPayload(0x1c, 0x104); |
| 11529 | assembly ("memory-safe") { |
| 11530 | mstore(0x00, m0) |
| 11531 | mstore(0x20, m1) |
| 11532 | mstore(0x40, m2) |
| 11533 | mstore(0x60, m3) |
| 11534 | mstore(0x80, m4) |
| 11535 | mstore(0xa0, m5) |
| 11536 | mstore(0xc0, m6) |
| 11537 | mstore(0xe0, m7) |
| 11538 | mstore(0x100, m8) |
| 11539 | } |
| 11540 | } |
| 11541 | |
| 11542 | function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure { |
| 11543 | bytes32 m0; |
| 11544 | bytes32 m1; |
| 11545 | bytes32 m2; |
| 11546 | bytes32 m3; |
| 11547 | bytes32 m4; |
| 11548 | bytes32 m5; |
| 11549 | bytes32 m6; |
| 11550 | bytes32 m7; |
| 11551 | bytes32 m8; |
| 11552 | assembly ("memory-safe") { |
| 11553 | function writeString(pos, w) { |
| 11554 | let length := 0 |
| 11555 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11556 | mstore(pos, length) |
| 11557 | let shift := sub(256, shl(3, length)) |
| 11558 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11559 | } |
| 11560 | m0 := mload(0x00) |
| 11561 | m1 := mload(0x20) |
| 11562 | m2 := mload(0x40) |
| 11563 | m3 := mload(0x60) |
| 11564 | m4 := mload(0x80) |
| 11565 | m5 := mload(0xa0) |
| 11566 | m6 := mload(0xc0) |
| 11567 | m7 := mload(0xe0) |
| 11568 | m8 := mload(0x100) |
| 11569 | // Selector of `log(string,bool,string,uint256)`. |
| 11570 | mstore(0x00, 0x24f91465) |
| 11571 | mstore(0x20, 0x80) |
| 11572 | mstore(0x40, p1) |
| 11573 | mstore(0x60, 0xc0) |
| 11574 | mstore(0x80, p3) |
| 11575 | writeString(0xa0, p0) |
| 11576 | writeString(0xe0, p2) |
| 11577 | } |
| 11578 | _sendLogPayload(0x1c, 0x104); |
| 11579 | assembly ("memory-safe") { |
| 11580 | mstore(0x00, m0) |
| 11581 | mstore(0x20, m1) |
| 11582 | mstore(0x40, m2) |
| 11583 | mstore(0x60, m3) |
| 11584 | mstore(0x80, m4) |
| 11585 | mstore(0xa0, m5) |
| 11586 | mstore(0xc0, m6) |
| 11587 | mstore(0xe0, m7) |
| 11588 | mstore(0x100, m8) |
| 11589 | } |
| 11590 | } |
| 11591 | |
| 11592 | function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { |
| 11593 | bytes32 m0; |
| 11594 | bytes32 m1; |
| 11595 | bytes32 m2; |
| 11596 | bytes32 m3; |
| 11597 | bytes32 m4; |
| 11598 | bytes32 m5; |
| 11599 | bytes32 m6; |
| 11600 | bytes32 m7; |
| 11601 | bytes32 m8; |
| 11602 | bytes32 m9; |
| 11603 | bytes32 m10; |
| 11604 | assembly ("memory-safe") { |
| 11605 | function writeString(pos, w) { |
| 11606 | let length := 0 |
| 11607 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11608 | mstore(pos, length) |
| 11609 | let shift := sub(256, shl(3, length)) |
| 11610 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11611 | } |
| 11612 | m0 := mload(0x00) |
| 11613 | m1 := mload(0x20) |
| 11614 | m2 := mload(0x40) |
| 11615 | m3 := mload(0x60) |
| 11616 | m4 := mload(0x80) |
| 11617 | m5 := mload(0xa0) |
| 11618 | m6 := mload(0xc0) |
| 11619 | m7 := mload(0xe0) |
| 11620 | m8 := mload(0x100) |
| 11621 | m9 := mload(0x120) |
| 11622 | m10 := mload(0x140) |
| 11623 | // Selector of `log(string,bool,string,string)`. |
| 11624 | mstore(0x00, 0xa826caeb) |
| 11625 | mstore(0x20, 0x80) |
| 11626 | mstore(0x40, p1) |
| 11627 | mstore(0x60, 0xc0) |
| 11628 | mstore(0x80, 0x100) |
| 11629 | writeString(0xa0, p0) |
| 11630 | writeString(0xe0, p2) |
| 11631 | writeString(0x120, p3) |
| 11632 | } |
| 11633 | _sendLogPayload(0x1c, 0x144); |
| 11634 | assembly ("memory-safe") { |
| 11635 | mstore(0x00, m0) |
| 11636 | mstore(0x20, m1) |
| 11637 | mstore(0x40, m2) |
| 11638 | mstore(0x60, m3) |
| 11639 | mstore(0x80, m4) |
| 11640 | mstore(0xa0, m5) |
| 11641 | mstore(0xc0, m6) |
| 11642 | mstore(0xe0, m7) |
| 11643 | mstore(0x100, m8) |
| 11644 | mstore(0x120, m9) |
| 11645 | mstore(0x140, m10) |
| 11646 | } |
| 11647 | } |
| 11648 | |
| 11649 | function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure { |
| 11650 | bytes32 m0; |
| 11651 | bytes32 m1; |
| 11652 | bytes32 m2; |
| 11653 | bytes32 m3; |
| 11654 | bytes32 m4; |
| 11655 | bytes32 m5; |
| 11656 | bytes32 m6; |
| 11657 | assembly ("memory-safe") { |
| 11658 | function writeString(pos, w) { |
| 11659 | let length := 0 |
| 11660 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11661 | mstore(pos, length) |
| 11662 | let shift := sub(256, shl(3, length)) |
| 11663 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11664 | } |
| 11665 | m0 := mload(0x00) |
| 11666 | m1 := mload(0x20) |
| 11667 | m2 := mload(0x40) |
| 11668 | m3 := mload(0x60) |
| 11669 | m4 := mload(0x80) |
| 11670 | m5 := mload(0xa0) |
| 11671 | m6 := mload(0xc0) |
| 11672 | // Selector of `log(string,uint256,address,address)`. |
| 11673 | mstore(0x00, 0x5ea2b7ae) |
| 11674 | mstore(0x20, 0x80) |
| 11675 | mstore(0x40, p1) |
| 11676 | mstore(0x60, p2) |
| 11677 | mstore(0x80, p3) |
| 11678 | writeString(0xa0, p0) |
| 11679 | } |
| 11680 | _sendLogPayload(0x1c, 0xc4); |
| 11681 | assembly ("memory-safe") { |
| 11682 | mstore(0x00, m0) |
| 11683 | mstore(0x20, m1) |
| 11684 | mstore(0x40, m2) |
| 11685 | mstore(0x60, m3) |
| 11686 | mstore(0x80, m4) |
| 11687 | mstore(0xa0, m5) |
| 11688 | mstore(0xc0, m6) |
| 11689 | } |
| 11690 | } |
| 11691 | |
| 11692 | function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure { |
| 11693 | bytes32 m0; |
| 11694 | bytes32 m1; |
| 11695 | bytes32 m2; |
| 11696 | bytes32 m3; |
| 11697 | bytes32 m4; |
| 11698 | bytes32 m5; |
| 11699 | bytes32 m6; |
| 11700 | assembly ("memory-safe") { |
| 11701 | function writeString(pos, w) { |
| 11702 | let length := 0 |
| 11703 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11704 | mstore(pos, length) |
| 11705 | let shift := sub(256, shl(3, length)) |
| 11706 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11707 | } |
| 11708 | m0 := mload(0x00) |
| 11709 | m1 := mload(0x20) |
| 11710 | m2 := mload(0x40) |
| 11711 | m3 := mload(0x60) |
| 11712 | m4 := mload(0x80) |
| 11713 | m5 := mload(0xa0) |
| 11714 | m6 := mload(0xc0) |
| 11715 | // Selector of `log(string,uint256,address,bool)`. |
| 11716 | mstore(0x00, 0x82112a42) |
| 11717 | mstore(0x20, 0x80) |
| 11718 | mstore(0x40, p1) |
| 11719 | mstore(0x60, p2) |
| 11720 | mstore(0x80, p3) |
| 11721 | writeString(0xa0, p0) |
| 11722 | } |
| 11723 | _sendLogPayload(0x1c, 0xc4); |
| 11724 | assembly ("memory-safe") { |
| 11725 | mstore(0x00, m0) |
| 11726 | mstore(0x20, m1) |
| 11727 | mstore(0x40, m2) |
| 11728 | mstore(0x60, m3) |
| 11729 | mstore(0x80, m4) |
| 11730 | mstore(0xa0, m5) |
| 11731 | mstore(0xc0, m6) |
| 11732 | } |
| 11733 | } |
| 11734 | |
| 11735 | function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure { |
| 11736 | bytes32 m0; |
| 11737 | bytes32 m1; |
| 11738 | bytes32 m2; |
| 11739 | bytes32 m3; |
| 11740 | bytes32 m4; |
| 11741 | bytes32 m5; |
| 11742 | bytes32 m6; |
| 11743 | assembly ("memory-safe") { |
| 11744 | function writeString(pos, w) { |
| 11745 | let length := 0 |
| 11746 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11747 | mstore(pos, length) |
| 11748 | let shift := sub(256, shl(3, length)) |
| 11749 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11750 | } |
| 11751 | m0 := mload(0x00) |
| 11752 | m1 := mload(0x20) |
| 11753 | m2 := mload(0x40) |
| 11754 | m3 := mload(0x60) |
| 11755 | m4 := mload(0x80) |
| 11756 | m5 := mload(0xa0) |
| 11757 | m6 := mload(0xc0) |
| 11758 | // Selector of `log(string,uint256,address,uint256)`. |
| 11759 | mstore(0x00, 0x4f04fdc6) |
| 11760 | mstore(0x20, 0x80) |
| 11761 | mstore(0x40, p1) |
| 11762 | mstore(0x60, p2) |
| 11763 | mstore(0x80, p3) |
| 11764 | writeString(0xa0, p0) |
| 11765 | } |
| 11766 | _sendLogPayload(0x1c, 0xc4); |
| 11767 | assembly ("memory-safe") { |
| 11768 | mstore(0x00, m0) |
| 11769 | mstore(0x20, m1) |
| 11770 | mstore(0x40, m2) |
| 11771 | mstore(0x60, m3) |
| 11772 | mstore(0x80, m4) |
| 11773 | mstore(0xa0, m5) |
| 11774 | mstore(0xc0, m6) |
| 11775 | } |
| 11776 | } |
| 11777 | |
| 11778 | function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure { |
| 11779 | bytes32 m0; |
| 11780 | bytes32 m1; |
| 11781 | bytes32 m2; |
| 11782 | bytes32 m3; |
| 11783 | bytes32 m4; |
| 11784 | bytes32 m5; |
| 11785 | bytes32 m6; |
| 11786 | bytes32 m7; |
| 11787 | bytes32 m8; |
| 11788 | assembly ("memory-safe") { |
| 11789 | function writeString(pos, w) { |
| 11790 | let length := 0 |
| 11791 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11792 | mstore(pos, length) |
| 11793 | let shift := sub(256, shl(3, length)) |
| 11794 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11795 | } |
| 11796 | m0 := mload(0x00) |
| 11797 | m1 := mload(0x20) |
| 11798 | m2 := mload(0x40) |
| 11799 | m3 := mload(0x60) |
| 11800 | m4 := mload(0x80) |
| 11801 | m5 := mload(0xa0) |
| 11802 | m6 := mload(0xc0) |
| 11803 | m7 := mload(0xe0) |
| 11804 | m8 := mload(0x100) |
| 11805 | // Selector of `log(string,uint256,address,string)`. |
| 11806 | mstore(0x00, 0x9ffb2f93) |
| 11807 | mstore(0x20, 0x80) |
| 11808 | mstore(0x40, p1) |
| 11809 | mstore(0x60, p2) |
| 11810 | mstore(0x80, 0xc0) |
| 11811 | writeString(0xa0, p0) |
| 11812 | writeString(0xe0, p3) |
| 11813 | } |
| 11814 | _sendLogPayload(0x1c, 0x104); |
| 11815 | assembly ("memory-safe") { |
| 11816 | mstore(0x00, m0) |
| 11817 | mstore(0x20, m1) |
| 11818 | mstore(0x40, m2) |
| 11819 | mstore(0x60, m3) |
| 11820 | mstore(0x80, m4) |
| 11821 | mstore(0xa0, m5) |
| 11822 | mstore(0xc0, m6) |
| 11823 | mstore(0xe0, m7) |
| 11824 | mstore(0x100, m8) |
| 11825 | } |
| 11826 | } |
| 11827 | |
| 11828 | function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure { |
| 11829 | bytes32 m0; |
| 11830 | bytes32 m1; |
| 11831 | bytes32 m2; |
| 11832 | bytes32 m3; |
| 11833 | bytes32 m4; |
| 11834 | bytes32 m5; |
| 11835 | bytes32 m6; |
| 11836 | assembly ("memory-safe") { |
| 11837 | function writeString(pos, w) { |
| 11838 | let length := 0 |
| 11839 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11840 | mstore(pos, length) |
| 11841 | let shift := sub(256, shl(3, length)) |
| 11842 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11843 | } |
| 11844 | m0 := mload(0x00) |
| 11845 | m1 := mload(0x20) |
| 11846 | m2 := mload(0x40) |
| 11847 | m3 := mload(0x60) |
| 11848 | m4 := mload(0x80) |
| 11849 | m5 := mload(0xa0) |
| 11850 | m6 := mload(0xc0) |
| 11851 | // Selector of `log(string,uint256,bool,address)`. |
| 11852 | mstore(0x00, 0xe0e95b98) |
| 11853 | mstore(0x20, 0x80) |
| 11854 | mstore(0x40, p1) |
| 11855 | mstore(0x60, p2) |
| 11856 | mstore(0x80, p3) |
| 11857 | writeString(0xa0, p0) |
| 11858 | } |
| 11859 | _sendLogPayload(0x1c, 0xc4); |
| 11860 | assembly ("memory-safe") { |
| 11861 | mstore(0x00, m0) |
| 11862 | mstore(0x20, m1) |
| 11863 | mstore(0x40, m2) |
| 11864 | mstore(0x60, m3) |
| 11865 | mstore(0x80, m4) |
| 11866 | mstore(0xa0, m5) |
| 11867 | mstore(0xc0, m6) |
| 11868 | } |
| 11869 | } |
| 11870 | |
| 11871 | function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure { |
| 11872 | bytes32 m0; |
| 11873 | bytes32 m1; |
| 11874 | bytes32 m2; |
| 11875 | bytes32 m3; |
| 11876 | bytes32 m4; |
| 11877 | bytes32 m5; |
| 11878 | bytes32 m6; |
| 11879 | assembly ("memory-safe") { |
| 11880 | function writeString(pos, w) { |
| 11881 | let length := 0 |
| 11882 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11883 | mstore(pos, length) |
| 11884 | let shift := sub(256, shl(3, length)) |
| 11885 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11886 | } |
| 11887 | m0 := mload(0x00) |
| 11888 | m1 := mload(0x20) |
| 11889 | m2 := mload(0x40) |
| 11890 | m3 := mload(0x60) |
| 11891 | m4 := mload(0x80) |
| 11892 | m5 := mload(0xa0) |
| 11893 | m6 := mload(0xc0) |
| 11894 | // Selector of `log(string,uint256,bool,bool)`. |
| 11895 | mstore(0x00, 0x354c36d6) |
| 11896 | mstore(0x20, 0x80) |
| 11897 | mstore(0x40, p1) |
| 11898 | mstore(0x60, p2) |
| 11899 | mstore(0x80, p3) |
| 11900 | writeString(0xa0, p0) |
| 11901 | } |
| 11902 | _sendLogPayload(0x1c, 0xc4); |
| 11903 | assembly ("memory-safe") { |
| 11904 | mstore(0x00, m0) |
| 11905 | mstore(0x20, m1) |
| 11906 | mstore(0x40, m2) |
| 11907 | mstore(0x60, m3) |
| 11908 | mstore(0x80, m4) |
| 11909 | mstore(0xa0, m5) |
| 11910 | mstore(0xc0, m6) |
| 11911 | } |
| 11912 | } |
| 11913 | |
| 11914 | function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure { |
| 11915 | bytes32 m0; |
| 11916 | bytes32 m1; |
| 11917 | bytes32 m2; |
| 11918 | bytes32 m3; |
| 11919 | bytes32 m4; |
| 11920 | bytes32 m5; |
| 11921 | bytes32 m6; |
| 11922 | assembly ("memory-safe") { |
| 11923 | function writeString(pos, w) { |
| 11924 | let length := 0 |
| 11925 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11926 | mstore(pos, length) |
| 11927 | let shift := sub(256, shl(3, length)) |
| 11928 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11929 | } |
| 11930 | m0 := mload(0x00) |
| 11931 | m1 := mload(0x20) |
| 11932 | m2 := mload(0x40) |
| 11933 | m3 := mload(0x60) |
| 11934 | m4 := mload(0x80) |
| 11935 | m5 := mload(0xa0) |
| 11936 | m6 := mload(0xc0) |
| 11937 | // Selector of `log(string,uint256,bool,uint256)`. |
| 11938 | mstore(0x00, 0xe41b6f6f) |
| 11939 | mstore(0x20, 0x80) |
| 11940 | mstore(0x40, p1) |
| 11941 | mstore(0x60, p2) |
| 11942 | mstore(0x80, p3) |
| 11943 | writeString(0xa0, p0) |
| 11944 | } |
| 11945 | _sendLogPayload(0x1c, 0xc4); |
| 11946 | assembly ("memory-safe") { |
| 11947 | mstore(0x00, m0) |
| 11948 | mstore(0x20, m1) |
| 11949 | mstore(0x40, m2) |
| 11950 | mstore(0x60, m3) |
| 11951 | mstore(0x80, m4) |
| 11952 | mstore(0xa0, m5) |
| 11953 | mstore(0xc0, m6) |
| 11954 | } |
| 11955 | } |
| 11956 | |
| 11957 | function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure { |
| 11958 | bytes32 m0; |
| 11959 | bytes32 m1; |
| 11960 | bytes32 m2; |
| 11961 | bytes32 m3; |
| 11962 | bytes32 m4; |
| 11963 | bytes32 m5; |
| 11964 | bytes32 m6; |
| 11965 | bytes32 m7; |
| 11966 | bytes32 m8; |
| 11967 | assembly ("memory-safe") { |
| 11968 | function writeString(pos, w) { |
| 11969 | let length := 0 |
| 11970 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 11971 | mstore(pos, length) |
| 11972 | let shift := sub(256, shl(3, length)) |
| 11973 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 11974 | } |
| 11975 | m0 := mload(0x00) |
| 11976 | m1 := mload(0x20) |
| 11977 | m2 := mload(0x40) |
| 11978 | m3 := mload(0x60) |
| 11979 | m4 := mload(0x80) |
| 11980 | m5 := mload(0xa0) |
| 11981 | m6 := mload(0xc0) |
| 11982 | m7 := mload(0xe0) |
| 11983 | m8 := mload(0x100) |
| 11984 | // Selector of `log(string,uint256,bool,string)`. |
| 11985 | mstore(0x00, 0xabf73a98) |
| 11986 | mstore(0x20, 0x80) |
| 11987 | mstore(0x40, p1) |
| 11988 | mstore(0x60, p2) |
| 11989 | mstore(0x80, 0xc0) |
| 11990 | writeString(0xa0, p0) |
| 11991 | writeString(0xe0, p3) |
| 11992 | } |
| 11993 | _sendLogPayload(0x1c, 0x104); |
| 11994 | assembly ("memory-safe") { |
| 11995 | mstore(0x00, m0) |
| 11996 | mstore(0x20, m1) |
| 11997 | mstore(0x40, m2) |
| 11998 | mstore(0x60, m3) |
| 11999 | mstore(0x80, m4) |
| 12000 | mstore(0xa0, m5) |
| 12001 | mstore(0xc0, m6) |
| 12002 | mstore(0xe0, m7) |
| 12003 | mstore(0x100, m8) |
| 12004 | } |
| 12005 | } |
| 12006 | |
| 12007 | function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure { |
| 12008 | bytes32 m0; |
| 12009 | bytes32 m1; |
| 12010 | bytes32 m2; |
| 12011 | bytes32 m3; |
| 12012 | bytes32 m4; |
| 12013 | bytes32 m5; |
| 12014 | bytes32 m6; |
| 12015 | assembly ("memory-safe") { |
| 12016 | function writeString(pos, w) { |
| 12017 | let length := 0 |
| 12018 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12019 | mstore(pos, length) |
| 12020 | let shift := sub(256, shl(3, length)) |
| 12021 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12022 | } |
| 12023 | m0 := mload(0x00) |
| 12024 | m1 := mload(0x20) |
| 12025 | m2 := mload(0x40) |
| 12026 | m3 := mload(0x60) |
| 12027 | m4 := mload(0x80) |
| 12028 | m5 := mload(0xa0) |
| 12029 | m6 := mload(0xc0) |
| 12030 | // Selector of `log(string,uint256,uint256,address)`. |
| 12031 | mstore(0x00, 0xe21de278) |
| 12032 | mstore(0x20, 0x80) |
| 12033 | mstore(0x40, p1) |
| 12034 | mstore(0x60, p2) |
| 12035 | mstore(0x80, p3) |
| 12036 | writeString(0xa0, p0) |
| 12037 | } |
| 12038 | _sendLogPayload(0x1c, 0xc4); |
| 12039 | assembly ("memory-safe") { |
| 12040 | mstore(0x00, m0) |
| 12041 | mstore(0x20, m1) |
| 12042 | mstore(0x40, m2) |
| 12043 | mstore(0x60, m3) |
| 12044 | mstore(0x80, m4) |
| 12045 | mstore(0xa0, m5) |
| 12046 | mstore(0xc0, m6) |
| 12047 | } |
| 12048 | } |
| 12049 | |
| 12050 | function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure { |
| 12051 | bytes32 m0; |
| 12052 | bytes32 m1; |
| 12053 | bytes32 m2; |
| 12054 | bytes32 m3; |
| 12055 | bytes32 m4; |
| 12056 | bytes32 m5; |
| 12057 | bytes32 m6; |
| 12058 | assembly ("memory-safe") { |
| 12059 | function writeString(pos, w) { |
| 12060 | let length := 0 |
| 12061 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12062 | mstore(pos, length) |
| 12063 | let shift := sub(256, shl(3, length)) |
| 12064 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12065 | } |
| 12066 | m0 := mload(0x00) |
| 12067 | m1 := mload(0x20) |
| 12068 | m2 := mload(0x40) |
| 12069 | m3 := mload(0x60) |
| 12070 | m4 := mload(0x80) |
| 12071 | m5 := mload(0xa0) |
| 12072 | m6 := mload(0xc0) |
| 12073 | // Selector of `log(string,uint256,uint256,bool)`. |
| 12074 | mstore(0x00, 0x7626db92) |
| 12075 | mstore(0x20, 0x80) |
| 12076 | mstore(0x40, p1) |
| 12077 | mstore(0x60, p2) |
| 12078 | mstore(0x80, p3) |
| 12079 | writeString(0xa0, p0) |
| 12080 | } |
| 12081 | _sendLogPayload(0x1c, 0xc4); |
| 12082 | assembly ("memory-safe") { |
| 12083 | mstore(0x00, m0) |
| 12084 | mstore(0x20, m1) |
| 12085 | mstore(0x40, m2) |
| 12086 | mstore(0x60, m3) |
| 12087 | mstore(0x80, m4) |
| 12088 | mstore(0xa0, m5) |
| 12089 | mstore(0xc0, m6) |
| 12090 | } |
| 12091 | } |
| 12092 | |
| 12093 | function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { |
| 12094 | bytes32 m0; |
| 12095 | bytes32 m1; |
| 12096 | bytes32 m2; |
| 12097 | bytes32 m3; |
| 12098 | bytes32 m4; |
| 12099 | bytes32 m5; |
| 12100 | bytes32 m6; |
| 12101 | assembly ("memory-safe") { |
| 12102 | function writeString(pos, w) { |
| 12103 | let length := 0 |
| 12104 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12105 | mstore(pos, length) |
| 12106 | let shift := sub(256, shl(3, length)) |
| 12107 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12108 | } |
| 12109 | m0 := mload(0x00) |
| 12110 | m1 := mload(0x20) |
| 12111 | m2 := mload(0x40) |
| 12112 | m3 := mload(0x60) |
| 12113 | m4 := mload(0x80) |
| 12114 | m5 := mload(0xa0) |
| 12115 | m6 := mload(0xc0) |
| 12116 | // Selector of `log(string,uint256,uint256,uint256)`. |
| 12117 | mstore(0x00, 0xa7a87853) |
| 12118 | mstore(0x20, 0x80) |
| 12119 | mstore(0x40, p1) |
| 12120 | mstore(0x60, p2) |
| 12121 | mstore(0x80, p3) |
| 12122 | writeString(0xa0, p0) |
| 12123 | } |
| 12124 | _sendLogPayload(0x1c, 0xc4); |
| 12125 | assembly ("memory-safe") { |
| 12126 | mstore(0x00, m0) |
| 12127 | mstore(0x20, m1) |
| 12128 | mstore(0x40, m2) |
| 12129 | mstore(0x60, m3) |
| 12130 | mstore(0x80, m4) |
| 12131 | mstore(0xa0, m5) |
| 12132 | mstore(0xc0, m6) |
| 12133 | } |
| 12134 | } |
| 12135 | |
| 12136 | function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { |
| 12137 | bytes32 m0; |
| 12138 | bytes32 m1; |
| 12139 | bytes32 m2; |
| 12140 | bytes32 m3; |
| 12141 | bytes32 m4; |
| 12142 | bytes32 m5; |
| 12143 | bytes32 m6; |
| 12144 | bytes32 m7; |
| 12145 | bytes32 m8; |
| 12146 | assembly ("memory-safe") { |
| 12147 | function writeString(pos, w) { |
| 12148 | let length := 0 |
| 12149 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12150 | mstore(pos, length) |
| 12151 | let shift := sub(256, shl(3, length)) |
| 12152 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12153 | } |
| 12154 | m0 := mload(0x00) |
| 12155 | m1 := mload(0x20) |
| 12156 | m2 := mload(0x40) |
| 12157 | m3 := mload(0x60) |
| 12158 | m4 := mload(0x80) |
| 12159 | m5 := mload(0xa0) |
| 12160 | m6 := mload(0xc0) |
| 12161 | m7 := mload(0xe0) |
| 12162 | m8 := mload(0x100) |
| 12163 | // Selector of `log(string,uint256,uint256,string)`. |
| 12164 | mstore(0x00, 0x854b3496) |
| 12165 | mstore(0x20, 0x80) |
| 12166 | mstore(0x40, p1) |
| 12167 | mstore(0x60, p2) |
| 12168 | mstore(0x80, 0xc0) |
| 12169 | writeString(0xa0, p0) |
| 12170 | writeString(0xe0, p3) |
| 12171 | } |
| 12172 | _sendLogPayload(0x1c, 0x104); |
| 12173 | assembly ("memory-safe") { |
| 12174 | mstore(0x00, m0) |
| 12175 | mstore(0x20, m1) |
| 12176 | mstore(0x40, m2) |
| 12177 | mstore(0x60, m3) |
| 12178 | mstore(0x80, m4) |
| 12179 | mstore(0xa0, m5) |
| 12180 | mstore(0xc0, m6) |
| 12181 | mstore(0xe0, m7) |
| 12182 | mstore(0x100, m8) |
| 12183 | } |
| 12184 | } |
| 12185 | |
| 12186 | function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure { |
| 12187 | bytes32 m0; |
| 12188 | bytes32 m1; |
| 12189 | bytes32 m2; |
| 12190 | bytes32 m3; |
| 12191 | bytes32 m4; |
| 12192 | bytes32 m5; |
| 12193 | bytes32 m6; |
| 12194 | bytes32 m7; |
| 12195 | bytes32 m8; |
| 12196 | assembly ("memory-safe") { |
| 12197 | function writeString(pos, w) { |
| 12198 | let length := 0 |
| 12199 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12200 | mstore(pos, length) |
| 12201 | let shift := sub(256, shl(3, length)) |
| 12202 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12203 | } |
| 12204 | m0 := mload(0x00) |
| 12205 | m1 := mload(0x20) |
| 12206 | m2 := mload(0x40) |
| 12207 | m3 := mload(0x60) |
| 12208 | m4 := mload(0x80) |
| 12209 | m5 := mload(0xa0) |
| 12210 | m6 := mload(0xc0) |
| 12211 | m7 := mload(0xe0) |
| 12212 | m8 := mload(0x100) |
| 12213 | // Selector of `log(string,uint256,string,address)`. |
| 12214 | mstore(0x00, 0x7c4632a4) |
| 12215 | mstore(0x20, 0x80) |
| 12216 | mstore(0x40, p1) |
| 12217 | mstore(0x60, 0xc0) |
| 12218 | mstore(0x80, p3) |
| 12219 | writeString(0xa0, p0) |
| 12220 | writeString(0xe0, p2) |
| 12221 | } |
| 12222 | _sendLogPayload(0x1c, 0x104); |
| 12223 | assembly ("memory-safe") { |
| 12224 | mstore(0x00, m0) |
| 12225 | mstore(0x20, m1) |
| 12226 | mstore(0x40, m2) |
| 12227 | mstore(0x60, m3) |
| 12228 | mstore(0x80, m4) |
| 12229 | mstore(0xa0, m5) |
| 12230 | mstore(0xc0, m6) |
| 12231 | mstore(0xe0, m7) |
| 12232 | mstore(0x100, m8) |
| 12233 | } |
| 12234 | } |
| 12235 | |
| 12236 | function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure { |
| 12237 | bytes32 m0; |
| 12238 | bytes32 m1; |
| 12239 | bytes32 m2; |
| 12240 | bytes32 m3; |
| 12241 | bytes32 m4; |
| 12242 | bytes32 m5; |
| 12243 | bytes32 m6; |
| 12244 | bytes32 m7; |
| 12245 | bytes32 m8; |
| 12246 | assembly ("memory-safe") { |
| 12247 | function writeString(pos, w) { |
| 12248 | let length := 0 |
| 12249 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12250 | mstore(pos, length) |
| 12251 | let shift := sub(256, shl(3, length)) |
| 12252 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12253 | } |
| 12254 | m0 := mload(0x00) |
| 12255 | m1 := mload(0x20) |
| 12256 | m2 := mload(0x40) |
| 12257 | m3 := mload(0x60) |
| 12258 | m4 := mload(0x80) |
| 12259 | m5 := mload(0xa0) |
| 12260 | m6 := mload(0xc0) |
| 12261 | m7 := mload(0xe0) |
| 12262 | m8 := mload(0x100) |
| 12263 | // Selector of `log(string,uint256,string,bool)`. |
| 12264 | mstore(0x00, 0x7d24491d) |
| 12265 | mstore(0x20, 0x80) |
| 12266 | mstore(0x40, p1) |
| 12267 | mstore(0x60, 0xc0) |
| 12268 | mstore(0x80, p3) |
| 12269 | writeString(0xa0, p0) |
| 12270 | writeString(0xe0, p2) |
| 12271 | } |
| 12272 | _sendLogPayload(0x1c, 0x104); |
| 12273 | assembly ("memory-safe") { |
| 12274 | mstore(0x00, m0) |
| 12275 | mstore(0x20, m1) |
| 12276 | mstore(0x40, m2) |
| 12277 | mstore(0x60, m3) |
| 12278 | mstore(0x80, m4) |
| 12279 | mstore(0xa0, m5) |
| 12280 | mstore(0xc0, m6) |
| 12281 | mstore(0xe0, m7) |
| 12282 | mstore(0x100, m8) |
| 12283 | } |
| 12284 | } |
| 12285 | |
| 12286 | function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { |
| 12287 | bytes32 m0; |
| 12288 | bytes32 m1; |
| 12289 | bytes32 m2; |
| 12290 | bytes32 m3; |
| 12291 | bytes32 m4; |
| 12292 | bytes32 m5; |
| 12293 | bytes32 m6; |
| 12294 | bytes32 m7; |
| 12295 | bytes32 m8; |
| 12296 | assembly ("memory-safe") { |
| 12297 | function writeString(pos, w) { |
| 12298 | let length := 0 |
| 12299 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12300 | mstore(pos, length) |
| 12301 | let shift := sub(256, shl(3, length)) |
| 12302 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12303 | } |
| 12304 | m0 := mload(0x00) |
| 12305 | m1 := mload(0x20) |
| 12306 | m2 := mload(0x40) |
| 12307 | m3 := mload(0x60) |
| 12308 | m4 := mload(0x80) |
| 12309 | m5 := mload(0xa0) |
| 12310 | m6 := mload(0xc0) |
| 12311 | m7 := mload(0xe0) |
| 12312 | m8 := mload(0x100) |
| 12313 | // Selector of `log(string,uint256,string,uint256)`. |
| 12314 | mstore(0x00, 0xc67ea9d1) |
| 12315 | mstore(0x20, 0x80) |
| 12316 | mstore(0x40, p1) |
| 12317 | mstore(0x60, 0xc0) |
| 12318 | mstore(0x80, p3) |
| 12319 | writeString(0xa0, p0) |
| 12320 | writeString(0xe0, p2) |
| 12321 | } |
| 12322 | _sendLogPayload(0x1c, 0x104); |
| 12323 | assembly ("memory-safe") { |
| 12324 | mstore(0x00, m0) |
| 12325 | mstore(0x20, m1) |
| 12326 | mstore(0x40, m2) |
| 12327 | mstore(0x60, m3) |
| 12328 | mstore(0x80, m4) |
| 12329 | mstore(0xa0, m5) |
| 12330 | mstore(0xc0, m6) |
| 12331 | mstore(0xe0, m7) |
| 12332 | mstore(0x100, m8) |
| 12333 | } |
| 12334 | } |
| 12335 | |
| 12336 | function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { |
| 12337 | bytes32 m0; |
| 12338 | bytes32 m1; |
| 12339 | bytes32 m2; |
| 12340 | bytes32 m3; |
| 12341 | bytes32 m4; |
| 12342 | bytes32 m5; |
| 12343 | bytes32 m6; |
| 12344 | bytes32 m7; |
| 12345 | bytes32 m8; |
| 12346 | bytes32 m9; |
| 12347 | bytes32 m10; |
| 12348 | assembly ("memory-safe") { |
| 12349 | function writeString(pos, w) { |
| 12350 | let length := 0 |
| 12351 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12352 | mstore(pos, length) |
| 12353 | let shift := sub(256, shl(3, length)) |
| 12354 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12355 | } |
| 12356 | m0 := mload(0x00) |
| 12357 | m1 := mload(0x20) |
| 12358 | m2 := mload(0x40) |
| 12359 | m3 := mload(0x60) |
| 12360 | m4 := mload(0x80) |
| 12361 | m5 := mload(0xa0) |
| 12362 | m6 := mload(0xc0) |
| 12363 | m7 := mload(0xe0) |
| 12364 | m8 := mload(0x100) |
| 12365 | m9 := mload(0x120) |
| 12366 | m10 := mload(0x140) |
| 12367 | // Selector of `log(string,uint256,string,string)`. |
| 12368 | mstore(0x00, 0x5ab84e1f) |
| 12369 | mstore(0x20, 0x80) |
| 12370 | mstore(0x40, p1) |
| 12371 | mstore(0x60, 0xc0) |
| 12372 | mstore(0x80, 0x100) |
| 12373 | writeString(0xa0, p0) |
| 12374 | writeString(0xe0, p2) |
| 12375 | writeString(0x120, p3) |
| 12376 | } |
| 12377 | _sendLogPayload(0x1c, 0x144); |
| 12378 | assembly ("memory-safe") { |
| 12379 | mstore(0x00, m0) |
| 12380 | mstore(0x20, m1) |
| 12381 | mstore(0x40, m2) |
| 12382 | mstore(0x60, m3) |
| 12383 | mstore(0x80, m4) |
| 12384 | mstore(0xa0, m5) |
| 12385 | mstore(0xc0, m6) |
| 12386 | mstore(0xe0, m7) |
| 12387 | mstore(0x100, m8) |
| 12388 | mstore(0x120, m9) |
| 12389 | mstore(0x140, m10) |
| 12390 | } |
| 12391 | } |
| 12392 | |
| 12393 | function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure { |
| 12394 | bytes32 m0; |
| 12395 | bytes32 m1; |
| 12396 | bytes32 m2; |
| 12397 | bytes32 m3; |
| 12398 | bytes32 m4; |
| 12399 | bytes32 m5; |
| 12400 | bytes32 m6; |
| 12401 | bytes32 m7; |
| 12402 | bytes32 m8; |
| 12403 | assembly ("memory-safe") { |
| 12404 | function writeString(pos, w) { |
| 12405 | let length := 0 |
| 12406 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12407 | mstore(pos, length) |
| 12408 | let shift := sub(256, shl(3, length)) |
| 12409 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12410 | } |
| 12411 | m0 := mload(0x00) |
| 12412 | m1 := mload(0x20) |
| 12413 | m2 := mload(0x40) |
| 12414 | m3 := mload(0x60) |
| 12415 | m4 := mload(0x80) |
| 12416 | m5 := mload(0xa0) |
| 12417 | m6 := mload(0xc0) |
| 12418 | m7 := mload(0xe0) |
| 12419 | m8 := mload(0x100) |
| 12420 | // Selector of `log(string,string,address,address)`. |
| 12421 | mstore(0x00, 0x439c7bef) |
| 12422 | mstore(0x20, 0x80) |
| 12423 | mstore(0x40, 0xc0) |
| 12424 | mstore(0x60, p2) |
| 12425 | mstore(0x80, p3) |
| 12426 | writeString(0xa0, p0) |
| 12427 | writeString(0xe0, p1) |
| 12428 | } |
| 12429 | _sendLogPayload(0x1c, 0x104); |
| 12430 | assembly ("memory-safe") { |
| 12431 | mstore(0x00, m0) |
| 12432 | mstore(0x20, m1) |
| 12433 | mstore(0x40, m2) |
| 12434 | mstore(0x60, m3) |
| 12435 | mstore(0x80, m4) |
| 12436 | mstore(0xa0, m5) |
| 12437 | mstore(0xc0, m6) |
| 12438 | mstore(0xe0, m7) |
| 12439 | mstore(0x100, m8) |
| 12440 | } |
| 12441 | } |
| 12442 | |
| 12443 | function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure { |
| 12444 | bytes32 m0; |
| 12445 | bytes32 m1; |
| 12446 | bytes32 m2; |
| 12447 | bytes32 m3; |
| 12448 | bytes32 m4; |
| 12449 | bytes32 m5; |
| 12450 | bytes32 m6; |
| 12451 | bytes32 m7; |
| 12452 | bytes32 m8; |
| 12453 | assembly ("memory-safe") { |
| 12454 | function writeString(pos, w) { |
| 12455 | let length := 0 |
| 12456 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12457 | mstore(pos, length) |
| 12458 | let shift := sub(256, shl(3, length)) |
| 12459 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12460 | } |
| 12461 | m0 := mload(0x00) |
| 12462 | m1 := mload(0x20) |
| 12463 | m2 := mload(0x40) |
| 12464 | m3 := mload(0x60) |
| 12465 | m4 := mload(0x80) |
| 12466 | m5 := mload(0xa0) |
| 12467 | m6 := mload(0xc0) |
| 12468 | m7 := mload(0xe0) |
| 12469 | m8 := mload(0x100) |
| 12470 | // Selector of `log(string,string,address,bool)`. |
| 12471 | mstore(0x00, 0x5ccd4e37) |
| 12472 | mstore(0x20, 0x80) |
| 12473 | mstore(0x40, 0xc0) |
| 12474 | mstore(0x60, p2) |
| 12475 | mstore(0x80, p3) |
| 12476 | writeString(0xa0, p0) |
| 12477 | writeString(0xe0, p1) |
| 12478 | } |
| 12479 | _sendLogPayload(0x1c, 0x104); |
| 12480 | assembly ("memory-safe") { |
| 12481 | mstore(0x00, m0) |
| 12482 | mstore(0x20, m1) |
| 12483 | mstore(0x40, m2) |
| 12484 | mstore(0x60, m3) |
| 12485 | mstore(0x80, m4) |
| 12486 | mstore(0xa0, m5) |
| 12487 | mstore(0xc0, m6) |
| 12488 | mstore(0xe0, m7) |
| 12489 | mstore(0x100, m8) |
| 12490 | } |
| 12491 | } |
| 12492 | |
| 12493 | function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure { |
| 12494 | bytes32 m0; |
| 12495 | bytes32 m1; |
| 12496 | bytes32 m2; |
| 12497 | bytes32 m3; |
| 12498 | bytes32 m4; |
| 12499 | bytes32 m5; |
| 12500 | bytes32 m6; |
| 12501 | bytes32 m7; |
| 12502 | bytes32 m8; |
| 12503 | assembly ("memory-safe") { |
| 12504 | function writeString(pos, w) { |
| 12505 | let length := 0 |
| 12506 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12507 | mstore(pos, length) |
| 12508 | let shift := sub(256, shl(3, length)) |
| 12509 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12510 | } |
| 12511 | m0 := mload(0x00) |
| 12512 | m1 := mload(0x20) |
| 12513 | m2 := mload(0x40) |
| 12514 | m3 := mload(0x60) |
| 12515 | m4 := mload(0x80) |
| 12516 | m5 := mload(0xa0) |
| 12517 | m6 := mload(0xc0) |
| 12518 | m7 := mload(0xe0) |
| 12519 | m8 := mload(0x100) |
| 12520 | // Selector of `log(string,string,address,uint256)`. |
| 12521 | mstore(0x00, 0x7cc3c607) |
| 12522 | mstore(0x20, 0x80) |
| 12523 | mstore(0x40, 0xc0) |
| 12524 | mstore(0x60, p2) |
| 12525 | mstore(0x80, p3) |
| 12526 | writeString(0xa0, p0) |
| 12527 | writeString(0xe0, p1) |
| 12528 | } |
| 12529 | _sendLogPayload(0x1c, 0x104); |
| 12530 | assembly ("memory-safe") { |
| 12531 | mstore(0x00, m0) |
| 12532 | mstore(0x20, m1) |
| 12533 | mstore(0x40, m2) |
| 12534 | mstore(0x60, m3) |
| 12535 | mstore(0x80, m4) |
| 12536 | mstore(0xa0, m5) |
| 12537 | mstore(0xc0, m6) |
| 12538 | mstore(0xe0, m7) |
| 12539 | mstore(0x100, m8) |
| 12540 | } |
| 12541 | } |
| 12542 | |
| 12543 | function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure { |
| 12544 | bytes32 m0; |
| 12545 | bytes32 m1; |
| 12546 | bytes32 m2; |
| 12547 | bytes32 m3; |
| 12548 | bytes32 m4; |
| 12549 | bytes32 m5; |
| 12550 | bytes32 m6; |
| 12551 | bytes32 m7; |
| 12552 | bytes32 m8; |
| 12553 | bytes32 m9; |
| 12554 | bytes32 m10; |
| 12555 | assembly ("memory-safe") { |
| 12556 | function writeString(pos, w) { |
| 12557 | let length := 0 |
| 12558 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12559 | mstore(pos, length) |
| 12560 | let shift := sub(256, shl(3, length)) |
| 12561 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12562 | } |
| 12563 | m0 := mload(0x00) |
| 12564 | m1 := mload(0x20) |
| 12565 | m2 := mload(0x40) |
| 12566 | m3 := mload(0x60) |
| 12567 | m4 := mload(0x80) |
| 12568 | m5 := mload(0xa0) |
| 12569 | m6 := mload(0xc0) |
| 12570 | m7 := mload(0xe0) |
| 12571 | m8 := mload(0x100) |
| 12572 | m9 := mload(0x120) |
| 12573 | m10 := mload(0x140) |
| 12574 | // Selector of `log(string,string,address,string)`. |
| 12575 | mstore(0x00, 0xeb1bff80) |
| 12576 | mstore(0x20, 0x80) |
| 12577 | mstore(0x40, 0xc0) |
| 12578 | mstore(0x60, p2) |
| 12579 | mstore(0x80, 0x100) |
| 12580 | writeString(0xa0, p0) |
| 12581 | writeString(0xe0, p1) |
| 12582 | writeString(0x120, p3) |
| 12583 | } |
| 12584 | _sendLogPayload(0x1c, 0x144); |
| 12585 | assembly ("memory-safe") { |
| 12586 | mstore(0x00, m0) |
| 12587 | mstore(0x20, m1) |
| 12588 | mstore(0x40, m2) |
| 12589 | mstore(0x60, m3) |
| 12590 | mstore(0x80, m4) |
| 12591 | mstore(0xa0, m5) |
| 12592 | mstore(0xc0, m6) |
| 12593 | mstore(0xe0, m7) |
| 12594 | mstore(0x100, m8) |
| 12595 | mstore(0x120, m9) |
| 12596 | mstore(0x140, m10) |
| 12597 | } |
| 12598 | } |
| 12599 | |
| 12600 | function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure { |
| 12601 | bytes32 m0; |
| 12602 | bytes32 m1; |
| 12603 | bytes32 m2; |
| 12604 | bytes32 m3; |
| 12605 | bytes32 m4; |
| 12606 | bytes32 m5; |
| 12607 | bytes32 m6; |
| 12608 | bytes32 m7; |
| 12609 | bytes32 m8; |
| 12610 | assembly ("memory-safe") { |
| 12611 | function writeString(pos, w) { |
| 12612 | let length := 0 |
| 12613 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12614 | mstore(pos, length) |
| 12615 | let shift := sub(256, shl(3, length)) |
| 12616 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12617 | } |
| 12618 | m0 := mload(0x00) |
| 12619 | m1 := mload(0x20) |
| 12620 | m2 := mload(0x40) |
| 12621 | m3 := mload(0x60) |
| 12622 | m4 := mload(0x80) |
| 12623 | m5 := mload(0xa0) |
| 12624 | m6 := mload(0xc0) |
| 12625 | m7 := mload(0xe0) |
| 12626 | m8 := mload(0x100) |
| 12627 | // Selector of `log(string,string,bool,address)`. |
| 12628 | mstore(0x00, 0xc371c7db) |
| 12629 | mstore(0x20, 0x80) |
| 12630 | mstore(0x40, 0xc0) |
| 12631 | mstore(0x60, p2) |
| 12632 | mstore(0x80, p3) |
| 12633 | writeString(0xa0, p0) |
| 12634 | writeString(0xe0, p1) |
| 12635 | } |
| 12636 | _sendLogPayload(0x1c, 0x104); |
| 12637 | assembly ("memory-safe") { |
| 12638 | mstore(0x00, m0) |
| 12639 | mstore(0x20, m1) |
| 12640 | mstore(0x40, m2) |
| 12641 | mstore(0x60, m3) |
| 12642 | mstore(0x80, m4) |
| 12643 | mstore(0xa0, m5) |
| 12644 | mstore(0xc0, m6) |
| 12645 | mstore(0xe0, m7) |
| 12646 | mstore(0x100, m8) |
| 12647 | } |
| 12648 | } |
| 12649 | |
| 12650 | function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure { |
| 12651 | bytes32 m0; |
| 12652 | bytes32 m1; |
| 12653 | bytes32 m2; |
| 12654 | bytes32 m3; |
| 12655 | bytes32 m4; |
| 12656 | bytes32 m5; |
| 12657 | bytes32 m6; |
| 12658 | bytes32 m7; |
| 12659 | bytes32 m8; |
| 12660 | assembly ("memory-safe") { |
| 12661 | function writeString(pos, w) { |
| 12662 | let length := 0 |
| 12663 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12664 | mstore(pos, length) |
| 12665 | let shift := sub(256, shl(3, length)) |
| 12666 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12667 | } |
| 12668 | m0 := mload(0x00) |
| 12669 | m1 := mload(0x20) |
| 12670 | m2 := mload(0x40) |
| 12671 | m3 := mload(0x60) |
| 12672 | m4 := mload(0x80) |
| 12673 | m5 := mload(0xa0) |
| 12674 | m6 := mload(0xc0) |
| 12675 | m7 := mload(0xe0) |
| 12676 | m8 := mload(0x100) |
| 12677 | // Selector of `log(string,string,bool,bool)`. |
| 12678 | mstore(0x00, 0x40785869) |
| 12679 | mstore(0x20, 0x80) |
| 12680 | mstore(0x40, 0xc0) |
| 12681 | mstore(0x60, p2) |
| 12682 | mstore(0x80, p3) |
| 12683 | writeString(0xa0, p0) |
| 12684 | writeString(0xe0, p1) |
| 12685 | } |
| 12686 | _sendLogPayload(0x1c, 0x104); |
| 12687 | assembly ("memory-safe") { |
| 12688 | mstore(0x00, m0) |
| 12689 | mstore(0x20, m1) |
| 12690 | mstore(0x40, m2) |
| 12691 | mstore(0x60, m3) |
| 12692 | mstore(0x80, m4) |
| 12693 | mstore(0xa0, m5) |
| 12694 | mstore(0xc0, m6) |
| 12695 | mstore(0xe0, m7) |
| 12696 | mstore(0x100, m8) |
| 12697 | } |
| 12698 | } |
| 12699 | |
| 12700 | function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure { |
| 12701 | bytes32 m0; |
| 12702 | bytes32 m1; |
| 12703 | bytes32 m2; |
| 12704 | bytes32 m3; |
| 12705 | bytes32 m4; |
| 12706 | bytes32 m5; |
| 12707 | bytes32 m6; |
| 12708 | bytes32 m7; |
| 12709 | bytes32 m8; |
| 12710 | assembly ("memory-safe") { |
| 12711 | function writeString(pos, w) { |
| 12712 | let length := 0 |
| 12713 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12714 | mstore(pos, length) |
| 12715 | let shift := sub(256, shl(3, length)) |
| 12716 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12717 | } |
| 12718 | m0 := mload(0x00) |
| 12719 | m1 := mload(0x20) |
| 12720 | m2 := mload(0x40) |
| 12721 | m3 := mload(0x60) |
| 12722 | m4 := mload(0x80) |
| 12723 | m5 := mload(0xa0) |
| 12724 | m6 := mload(0xc0) |
| 12725 | m7 := mload(0xe0) |
| 12726 | m8 := mload(0x100) |
| 12727 | // Selector of `log(string,string,bool,uint256)`. |
| 12728 | mstore(0x00, 0xd6aefad2) |
| 12729 | mstore(0x20, 0x80) |
| 12730 | mstore(0x40, 0xc0) |
| 12731 | mstore(0x60, p2) |
| 12732 | mstore(0x80, p3) |
| 12733 | writeString(0xa0, p0) |
| 12734 | writeString(0xe0, p1) |
| 12735 | } |
| 12736 | _sendLogPayload(0x1c, 0x104); |
| 12737 | assembly ("memory-safe") { |
| 12738 | mstore(0x00, m0) |
| 12739 | mstore(0x20, m1) |
| 12740 | mstore(0x40, m2) |
| 12741 | mstore(0x60, m3) |
| 12742 | mstore(0x80, m4) |
| 12743 | mstore(0xa0, m5) |
| 12744 | mstore(0xc0, m6) |
| 12745 | mstore(0xe0, m7) |
| 12746 | mstore(0x100, m8) |
| 12747 | } |
| 12748 | } |
| 12749 | |
| 12750 | function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { |
| 12751 | bytes32 m0; |
| 12752 | bytes32 m1; |
| 12753 | bytes32 m2; |
| 12754 | bytes32 m3; |
| 12755 | bytes32 m4; |
| 12756 | bytes32 m5; |
| 12757 | bytes32 m6; |
| 12758 | bytes32 m7; |
| 12759 | bytes32 m8; |
| 12760 | bytes32 m9; |
| 12761 | bytes32 m10; |
| 12762 | assembly ("memory-safe") { |
| 12763 | function writeString(pos, w) { |
| 12764 | let length := 0 |
| 12765 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12766 | mstore(pos, length) |
| 12767 | let shift := sub(256, shl(3, length)) |
| 12768 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12769 | } |
| 12770 | m0 := mload(0x00) |
| 12771 | m1 := mload(0x20) |
| 12772 | m2 := mload(0x40) |
| 12773 | m3 := mload(0x60) |
| 12774 | m4 := mload(0x80) |
| 12775 | m5 := mload(0xa0) |
| 12776 | m6 := mload(0xc0) |
| 12777 | m7 := mload(0xe0) |
| 12778 | m8 := mload(0x100) |
| 12779 | m9 := mload(0x120) |
| 12780 | m10 := mload(0x140) |
| 12781 | // Selector of `log(string,string,bool,string)`. |
| 12782 | mstore(0x00, 0x5e84b0ea) |
| 12783 | mstore(0x20, 0x80) |
| 12784 | mstore(0x40, 0xc0) |
| 12785 | mstore(0x60, p2) |
| 12786 | mstore(0x80, 0x100) |
| 12787 | writeString(0xa0, p0) |
| 12788 | writeString(0xe0, p1) |
| 12789 | writeString(0x120, p3) |
| 12790 | } |
| 12791 | _sendLogPayload(0x1c, 0x144); |
| 12792 | assembly ("memory-safe") { |
| 12793 | mstore(0x00, m0) |
| 12794 | mstore(0x20, m1) |
| 12795 | mstore(0x40, m2) |
| 12796 | mstore(0x60, m3) |
| 12797 | mstore(0x80, m4) |
| 12798 | mstore(0xa0, m5) |
| 12799 | mstore(0xc0, m6) |
| 12800 | mstore(0xe0, m7) |
| 12801 | mstore(0x100, m8) |
| 12802 | mstore(0x120, m9) |
| 12803 | mstore(0x140, m10) |
| 12804 | } |
| 12805 | } |
| 12806 | |
| 12807 | function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure { |
| 12808 | bytes32 m0; |
| 12809 | bytes32 m1; |
| 12810 | bytes32 m2; |
| 12811 | bytes32 m3; |
| 12812 | bytes32 m4; |
| 12813 | bytes32 m5; |
| 12814 | bytes32 m6; |
| 12815 | bytes32 m7; |
| 12816 | bytes32 m8; |
| 12817 | assembly ("memory-safe") { |
| 12818 | function writeString(pos, w) { |
| 12819 | let length := 0 |
| 12820 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12821 | mstore(pos, length) |
| 12822 | let shift := sub(256, shl(3, length)) |
| 12823 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12824 | } |
| 12825 | m0 := mload(0x00) |
| 12826 | m1 := mload(0x20) |
| 12827 | m2 := mload(0x40) |
| 12828 | m3 := mload(0x60) |
| 12829 | m4 := mload(0x80) |
| 12830 | m5 := mload(0xa0) |
| 12831 | m6 := mload(0xc0) |
| 12832 | m7 := mload(0xe0) |
| 12833 | m8 := mload(0x100) |
| 12834 | // Selector of `log(string,string,uint256,address)`. |
| 12835 | mstore(0x00, 0x1023f7b2) |
| 12836 | mstore(0x20, 0x80) |
| 12837 | mstore(0x40, 0xc0) |
| 12838 | mstore(0x60, p2) |
| 12839 | mstore(0x80, p3) |
| 12840 | writeString(0xa0, p0) |
| 12841 | writeString(0xe0, p1) |
| 12842 | } |
| 12843 | _sendLogPayload(0x1c, 0x104); |
| 12844 | assembly ("memory-safe") { |
| 12845 | mstore(0x00, m0) |
| 12846 | mstore(0x20, m1) |
| 12847 | mstore(0x40, m2) |
| 12848 | mstore(0x60, m3) |
| 12849 | mstore(0x80, m4) |
| 12850 | mstore(0xa0, m5) |
| 12851 | mstore(0xc0, m6) |
| 12852 | mstore(0xe0, m7) |
| 12853 | mstore(0x100, m8) |
| 12854 | } |
| 12855 | } |
| 12856 | |
| 12857 | function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure { |
| 12858 | bytes32 m0; |
| 12859 | bytes32 m1; |
| 12860 | bytes32 m2; |
| 12861 | bytes32 m3; |
| 12862 | bytes32 m4; |
| 12863 | bytes32 m5; |
| 12864 | bytes32 m6; |
| 12865 | bytes32 m7; |
| 12866 | bytes32 m8; |
| 12867 | assembly ("memory-safe") { |
| 12868 | function writeString(pos, w) { |
| 12869 | let length := 0 |
| 12870 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12871 | mstore(pos, length) |
| 12872 | let shift := sub(256, shl(3, length)) |
| 12873 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12874 | } |
| 12875 | m0 := mload(0x00) |
| 12876 | m1 := mload(0x20) |
| 12877 | m2 := mload(0x40) |
| 12878 | m3 := mload(0x60) |
| 12879 | m4 := mload(0x80) |
| 12880 | m5 := mload(0xa0) |
| 12881 | m6 := mload(0xc0) |
| 12882 | m7 := mload(0xe0) |
| 12883 | m8 := mload(0x100) |
| 12884 | // Selector of `log(string,string,uint256,bool)`. |
| 12885 | mstore(0x00, 0xc3a8a654) |
| 12886 | mstore(0x20, 0x80) |
| 12887 | mstore(0x40, 0xc0) |
| 12888 | mstore(0x60, p2) |
| 12889 | mstore(0x80, p3) |
| 12890 | writeString(0xa0, p0) |
| 12891 | writeString(0xe0, p1) |
| 12892 | } |
| 12893 | _sendLogPayload(0x1c, 0x104); |
| 12894 | assembly ("memory-safe") { |
| 12895 | mstore(0x00, m0) |
| 12896 | mstore(0x20, m1) |
| 12897 | mstore(0x40, m2) |
| 12898 | mstore(0x60, m3) |
| 12899 | mstore(0x80, m4) |
| 12900 | mstore(0xa0, m5) |
| 12901 | mstore(0xc0, m6) |
| 12902 | mstore(0xe0, m7) |
| 12903 | mstore(0x100, m8) |
| 12904 | } |
| 12905 | } |
| 12906 | |
| 12907 | function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { |
| 12908 | bytes32 m0; |
| 12909 | bytes32 m1; |
| 12910 | bytes32 m2; |
| 12911 | bytes32 m3; |
| 12912 | bytes32 m4; |
| 12913 | bytes32 m5; |
| 12914 | bytes32 m6; |
| 12915 | bytes32 m7; |
| 12916 | bytes32 m8; |
| 12917 | assembly ("memory-safe") { |
| 12918 | function writeString(pos, w) { |
| 12919 | let length := 0 |
| 12920 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12921 | mstore(pos, length) |
| 12922 | let shift := sub(256, shl(3, length)) |
| 12923 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12924 | } |
| 12925 | m0 := mload(0x00) |
| 12926 | m1 := mload(0x20) |
| 12927 | m2 := mload(0x40) |
| 12928 | m3 := mload(0x60) |
| 12929 | m4 := mload(0x80) |
| 12930 | m5 := mload(0xa0) |
| 12931 | m6 := mload(0xc0) |
| 12932 | m7 := mload(0xe0) |
| 12933 | m8 := mload(0x100) |
| 12934 | // Selector of `log(string,string,uint256,uint256)`. |
| 12935 | mstore(0x00, 0xf45d7d2c) |
| 12936 | mstore(0x20, 0x80) |
| 12937 | mstore(0x40, 0xc0) |
| 12938 | mstore(0x60, p2) |
| 12939 | mstore(0x80, p3) |
| 12940 | writeString(0xa0, p0) |
| 12941 | writeString(0xe0, p1) |
| 12942 | } |
| 12943 | _sendLogPayload(0x1c, 0x104); |
| 12944 | assembly ("memory-safe") { |
| 12945 | mstore(0x00, m0) |
| 12946 | mstore(0x20, m1) |
| 12947 | mstore(0x40, m2) |
| 12948 | mstore(0x60, m3) |
| 12949 | mstore(0x80, m4) |
| 12950 | mstore(0xa0, m5) |
| 12951 | mstore(0xc0, m6) |
| 12952 | mstore(0xe0, m7) |
| 12953 | mstore(0x100, m8) |
| 12954 | } |
| 12955 | } |
| 12956 | |
| 12957 | function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { |
| 12958 | bytes32 m0; |
| 12959 | bytes32 m1; |
| 12960 | bytes32 m2; |
| 12961 | bytes32 m3; |
| 12962 | bytes32 m4; |
| 12963 | bytes32 m5; |
| 12964 | bytes32 m6; |
| 12965 | bytes32 m7; |
| 12966 | bytes32 m8; |
| 12967 | bytes32 m9; |
| 12968 | bytes32 m10; |
| 12969 | assembly ("memory-safe") { |
| 12970 | function writeString(pos, w) { |
| 12971 | let length := 0 |
| 12972 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 12973 | mstore(pos, length) |
| 12974 | let shift := sub(256, shl(3, length)) |
| 12975 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 12976 | } |
| 12977 | m0 := mload(0x00) |
| 12978 | m1 := mload(0x20) |
| 12979 | m2 := mload(0x40) |
| 12980 | m3 := mload(0x60) |
| 12981 | m4 := mload(0x80) |
| 12982 | m5 := mload(0xa0) |
| 12983 | m6 := mload(0xc0) |
| 12984 | m7 := mload(0xe0) |
| 12985 | m8 := mload(0x100) |
| 12986 | m9 := mload(0x120) |
| 12987 | m10 := mload(0x140) |
| 12988 | // Selector of `log(string,string,uint256,string)`. |
| 12989 | mstore(0x00, 0x5d1a971a) |
| 12990 | mstore(0x20, 0x80) |
| 12991 | mstore(0x40, 0xc0) |
| 12992 | mstore(0x60, p2) |
| 12993 | mstore(0x80, 0x100) |
| 12994 | writeString(0xa0, p0) |
| 12995 | writeString(0xe0, p1) |
| 12996 | writeString(0x120, p3) |
| 12997 | } |
| 12998 | _sendLogPayload(0x1c, 0x144); |
| 12999 | assembly ("memory-safe") { |
| 13000 | mstore(0x00, m0) |
| 13001 | mstore(0x20, m1) |
| 13002 | mstore(0x40, m2) |
| 13003 | mstore(0x60, m3) |
| 13004 | mstore(0x80, m4) |
| 13005 | mstore(0xa0, m5) |
| 13006 | mstore(0xc0, m6) |
| 13007 | mstore(0xe0, m7) |
| 13008 | mstore(0x100, m8) |
| 13009 | mstore(0x120, m9) |
| 13010 | mstore(0x140, m10) |
| 13011 | } |
| 13012 | } |
| 13013 | |
| 13014 | function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure { |
| 13015 | bytes32 m0; |
| 13016 | bytes32 m1; |
| 13017 | bytes32 m2; |
| 13018 | bytes32 m3; |
| 13019 | bytes32 m4; |
| 13020 | bytes32 m5; |
| 13021 | bytes32 m6; |
| 13022 | bytes32 m7; |
| 13023 | bytes32 m8; |
| 13024 | bytes32 m9; |
| 13025 | bytes32 m10; |
| 13026 | assembly ("memory-safe") { |
| 13027 | function writeString(pos, w) { |
| 13028 | let length := 0 |
| 13029 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 13030 | mstore(pos, length) |
| 13031 | let shift := sub(256, shl(3, length)) |
| 13032 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 13033 | } |
| 13034 | m0 := mload(0x00) |
| 13035 | m1 := mload(0x20) |
| 13036 | m2 := mload(0x40) |
| 13037 | m3 := mload(0x60) |
| 13038 | m4 := mload(0x80) |
| 13039 | m5 := mload(0xa0) |
| 13040 | m6 := mload(0xc0) |
| 13041 | m7 := mload(0xe0) |
| 13042 | m8 := mload(0x100) |
| 13043 | m9 := mload(0x120) |
| 13044 | m10 := mload(0x140) |
| 13045 | // Selector of `log(string,string,string,address)`. |
| 13046 | mstore(0x00, 0x6d572f44) |
| 13047 | mstore(0x20, 0x80) |
| 13048 | mstore(0x40, 0xc0) |
| 13049 | mstore(0x60, 0x100) |
| 13050 | mstore(0x80, p3) |
| 13051 | writeString(0xa0, p0) |
| 13052 | writeString(0xe0, p1) |
| 13053 | writeString(0x120, p2) |
| 13054 | } |
| 13055 | _sendLogPayload(0x1c, 0x144); |
| 13056 | assembly ("memory-safe") { |
| 13057 | mstore(0x00, m0) |
| 13058 | mstore(0x20, m1) |
| 13059 | mstore(0x40, m2) |
| 13060 | mstore(0x60, m3) |
| 13061 | mstore(0x80, m4) |
| 13062 | mstore(0xa0, m5) |
| 13063 | mstore(0xc0, m6) |
| 13064 | mstore(0xe0, m7) |
| 13065 | mstore(0x100, m8) |
| 13066 | mstore(0x120, m9) |
| 13067 | mstore(0x140, m10) |
| 13068 | } |
| 13069 | } |
| 13070 | |
| 13071 | function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { |
| 13072 | bytes32 m0; |
| 13073 | bytes32 m1; |
| 13074 | bytes32 m2; |
| 13075 | bytes32 m3; |
| 13076 | bytes32 m4; |
| 13077 | bytes32 m5; |
| 13078 | bytes32 m6; |
| 13079 | bytes32 m7; |
| 13080 | bytes32 m8; |
| 13081 | bytes32 m9; |
| 13082 | bytes32 m10; |
| 13083 | assembly ("memory-safe") { |
| 13084 | function writeString(pos, w) { |
| 13085 | let length := 0 |
| 13086 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 13087 | mstore(pos, length) |
| 13088 | let shift := sub(256, shl(3, length)) |
| 13089 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 13090 | } |
| 13091 | m0 := mload(0x00) |
| 13092 | m1 := mload(0x20) |
| 13093 | m2 := mload(0x40) |
| 13094 | m3 := mload(0x60) |
| 13095 | m4 := mload(0x80) |
| 13096 | m5 := mload(0xa0) |
| 13097 | m6 := mload(0xc0) |
| 13098 | m7 := mload(0xe0) |
| 13099 | m8 := mload(0x100) |
| 13100 | m9 := mload(0x120) |
| 13101 | m10 := mload(0x140) |
| 13102 | // Selector of `log(string,string,string,bool)`. |
| 13103 | mstore(0x00, 0x2c1754ed) |
| 13104 | mstore(0x20, 0x80) |
| 13105 | mstore(0x40, 0xc0) |
| 13106 | mstore(0x60, 0x100) |
| 13107 | mstore(0x80, p3) |
| 13108 | writeString(0xa0, p0) |
| 13109 | writeString(0xe0, p1) |
| 13110 | writeString(0x120, p2) |
| 13111 | } |
| 13112 | _sendLogPayload(0x1c, 0x144); |
| 13113 | assembly ("memory-safe") { |
| 13114 | mstore(0x00, m0) |
| 13115 | mstore(0x20, m1) |
| 13116 | mstore(0x40, m2) |
| 13117 | mstore(0x60, m3) |
| 13118 | mstore(0x80, m4) |
| 13119 | mstore(0xa0, m5) |
| 13120 | mstore(0xc0, m6) |
| 13121 | mstore(0xe0, m7) |
| 13122 | mstore(0x100, m8) |
| 13123 | mstore(0x120, m9) |
| 13124 | mstore(0x140, m10) |
| 13125 | } |
| 13126 | } |
| 13127 | |
| 13128 | function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { |
| 13129 | bytes32 m0; |
| 13130 | bytes32 m1; |
| 13131 | bytes32 m2; |
| 13132 | bytes32 m3; |
| 13133 | bytes32 m4; |
| 13134 | bytes32 m5; |
| 13135 | bytes32 m6; |
| 13136 | bytes32 m7; |
| 13137 | bytes32 m8; |
| 13138 | bytes32 m9; |
| 13139 | bytes32 m10; |
| 13140 | assembly ("memory-safe") { |
| 13141 | function writeString(pos, w) { |
| 13142 | let length := 0 |
| 13143 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 13144 | mstore(pos, length) |
| 13145 | let shift := sub(256, shl(3, length)) |
| 13146 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 13147 | } |
| 13148 | m0 := mload(0x00) |
| 13149 | m1 := mload(0x20) |
| 13150 | m2 := mload(0x40) |
| 13151 | m3 := mload(0x60) |
| 13152 | m4 := mload(0x80) |
| 13153 | m5 := mload(0xa0) |
| 13154 | m6 := mload(0xc0) |
| 13155 | m7 := mload(0xe0) |
| 13156 | m8 := mload(0x100) |
| 13157 | m9 := mload(0x120) |
| 13158 | m10 := mload(0x140) |
| 13159 | // Selector of `log(string,string,string,uint256)`. |
| 13160 | mstore(0x00, 0x8eafb02b) |
| 13161 | mstore(0x20, 0x80) |
| 13162 | mstore(0x40, 0xc0) |
| 13163 | mstore(0x60, 0x100) |
| 13164 | mstore(0x80, p3) |
| 13165 | writeString(0xa0, p0) |
| 13166 | writeString(0xe0, p1) |
| 13167 | writeString(0x120, p2) |
| 13168 | } |
| 13169 | _sendLogPayload(0x1c, 0x144); |
| 13170 | assembly ("memory-safe") { |
| 13171 | mstore(0x00, m0) |
| 13172 | mstore(0x20, m1) |
| 13173 | mstore(0x40, m2) |
| 13174 | mstore(0x60, m3) |
| 13175 | mstore(0x80, m4) |
| 13176 | mstore(0xa0, m5) |
| 13177 | mstore(0xc0, m6) |
| 13178 | mstore(0xe0, m7) |
| 13179 | mstore(0x100, m8) |
| 13180 | mstore(0x120, m9) |
| 13181 | mstore(0x140, m10) |
| 13182 | } |
| 13183 | } |
| 13184 | |
| 13185 | function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { |
| 13186 | bytes32 m0; |
| 13187 | bytes32 m1; |
| 13188 | bytes32 m2; |
| 13189 | bytes32 m3; |
| 13190 | bytes32 m4; |
| 13191 | bytes32 m5; |
| 13192 | bytes32 m6; |
| 13193 | bytes32 m7; |
| 13194 | bytes32 m8; |
| 13195 | bytes32 m9; |
| 13196 | bytes32 m10; |
| 13197 | bytes32 m11; |
| 13198 | bytes32 m12; |
| 13199 | assembly ("memory-safe") { |
| 13200 | function writeString(pos, w) { |
| 13201 | let length := 0 |
| 13202 | for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } |
| 13203 | mstore(pos, length) |
| 13204 | let shift := sub(256, shl(3, length)) |
| 13205 | mstore(add(pos, 0x20), shl(shift, shr(shift, w))) |
| 13206 | } |
| 13207 | m0 := mload(0x00) |
| 13208 | m1 := mload(0x20) |
| 13209 | m2 := mload(0x40) |
| 13210 | m3 := mload(0x60) |
| 13211 | m4 := mload(0x80) |
| 13212 | m5 := mload(0xa0) |
| 13213 | m6 := mload(0xc0) |
| 13214 | m7 := mload(0xe0) |
| 13215 | m8 := mload(0x100) |
| 13216 | m9 := mload(0x120) |
| 13217 | m10 := mload(0x140) |
| 13218 | m11 := mload(0x160) |
| 13219 | m12 := mload(0x180) |
| 13220 | // Selector of `log(string,string,string,string)`. |
| 13221 | mstore(0x00, 0xde68f20a) |
| 13222 | mstore(0x20, 0x80) |
| 13223 | mstore(0x40, 0xc0) |
| 13224 | mstore(0x60, 0x100) |
| 13225 | mstore(0x80, 0x140) |
| 13226 | writeString(0xa0, p0) |
| 13227 | writeString(0xe0, p1) |
| 13228 | writeString(0x120, p2) |
| 13229 | writeString(0x160, p3) |
| 13230 | } |
| 13231 | _sendLogPayload(0x1c, 0x184); |
| 13232 | assembly ("memory-safe") { |
| 13233 | mstore(0x00, m0) |
| 13234 | mstore(0x20, m1) |
| 13235 | mstore(0x40, m2) |
| 13236 | mstore(0x60, m3) |
| 13237 | mstore(0x80, m4) |
| 13238 | mstore(0xa0, m5) |
| 13239 | mstore(0xc0, m6) |
| 13240 | mstore(0xe0, m7) |
| 13241 | mstore(0x100, m8) |
| 13242 | mstore(0x120, m9) |
| 13243 | mstore(0x140, m10) |
| 13244 | mstore(0x160, m11) |
| 13245 | mstore(0x180, m12) |
| 13246 | } |
| 13247 | } |
| 13248 | } |
| 13249 |
100.0%
lib/setup-helpers/src/ActorManager.sol
Lines covered: 7 / 7 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseSetup} from "@chimera/BaseSetup.sol"; |
| 5 | import {vm} from "@chimera/Hevm.sol"; |
| 6 | import {EnumerableSet} from "./EnumerableSet.sol"; |
| 7 | |
| 8 | /// @dev This is the source of truth for the actors being used in the test |
| 9 | /// @notice No actors should be used in the suite without being added here first |
| 10 | abstract contract ActorManager { |
| 11 | using EnumerableSet for EnumerableSet.AddressSet; |
| 12 | |
| 13 | ///@notice The current actor being used |
| 14 | address private _actor; |
| 15 | |
| 16 | ///@notice The list of all actors being used |
| 17 | EnumerableSet.AddressSet private _actors; |
| 18 | |
| 19 | // If the current target is address(0) then it has not been setup yet and should revert |
| 20 | error ActorNotSetup(); |
| 21 | // Do not allow duplicates |
| 22 | error ActorExists(); |
| 23 | // If the actor does not exist |
| 24 | error ActorNotAdded(); |
| 25 | // Do not allow the default actor |
| 26 | error DefaultActor(); |
| 27 | |
| 28 | /// @notice address(this) is the default actor |
| 29 | constructor() { |
| 30 | _actors.add(address(this)); |
| 31 | _actor = address(this); |
| 32 | } |
| 33 | |
| 34 | /// @notice Returns the current active actor |
| 35 | function _getActor() internal view returns (address) { |
| 36 | return _actor; |
| 37 | } |
| 38 | |
| 39 | /// @notice Returns all actors being used |
| 40 | function _getActors() internal view returns (address[] memory) { |
| 41 | return _actors.values(); |
| 42 | } |
| 43 | |
| 44 | /// @notice Adds an actor to the list of actors |
| 45 | function _addActor(address target) internal { |
| 46 | if (_actors.contains(target)) { |
| 47 | revert ActorExists(); |
| 48 | } |
| 49 | |
| 50 | if (target == address(this)) { |
| 51 | revert DefaultActor(); |
| 52 | } |
| 53 | |
| 54 | _actors.add(target); |
| 55 | } |
| 56 | |
| 57 | /// @notice Removes an actor from the list of actors |
| 58 | function _removeActor(address target) internal { |
| 59 | if (!_actors.contains(target)) { |
| 60 | revert ActorNotAdded(); |
| 61 | } |
| 62 | |
| 63 | if (target == address(this)) { |
| 64 | revert DefaultActor(); |
| 65 | } |
| 66 | |
| 67 | _actors.remove(target); |
| 68 | } |
| 69 | |
| 70 | /// @dev Expose this in the `TargetFunctions` contract to let the fuzzer switch actors |
| 71 | /// NOTE: We revert if the entropy is greater than the number of actors, for Halmos compatibility |
| 72 | /// @dev This may reduce fuzzing performance if using multiple actors, if so add explicitly clamped handlers to ManagersTargets using the index of all added actors |
| 73 | /// @notice Switches the current actor based on the entropy |
| 74 | /// @param entropy The entropy to choose a random actor in the array for switching |
| 75 | /// @return target The new active actor |
| 76 | function _switchActor(uint256 entropy) internal returns (address target) { |
| 77 | target = _actors.at(entropy); |
| 78 | _actor = target; |
| 79 | } |
| 80 | } |
| 81 |
93.0%
lib/setup-helpers/src/AssetManager.sol
Lines covered: 15 / 16 (93.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseSetup} from "@chimera/BaseSetup.sol"; |
| 5 | import {vm} from "@chimera/Hevm.sol"; |
| 6 | |
| 7 | import {EnumerableSet} from "./EnumerableSet.sol"; |
| 8 | import {MockERC20} from "./MockERC20.sol"; |
| 9 | |
| 10 | /// @dev Source of truth for the assets being used in the test |
| 11 | /// @notice No assets should be used in the suite without being added here first |
| 12 | abstract contract AssetManager { |
| 13 | using EnumerableSet for EnumerableSet.AddressSet; |
| 14 | |
| 15 | /// @notice The current target for this set of variables |
| 16 | address private __asset; |
| 17 | |
| 18 | /// @notice The list of all assets being used |
| 19 | EnumerableSet.AddressSet private _assets; |
| 20 | |
| 21 | // If the current target is address(0) then it has not been setup yet and should revert |
| 22 | error NotSetup(); |
| 23 | // Do not allow duplicates |
| 24 | error Exists(); |
| 25 | // Enable only added assets |
| 26 | error NotAdded(); |
| 27 | |
| 28 | /// @notice Returns the current active asset |
| 29 | function _getAsset() internal view returns (address) { |
| 30 | if (__asset == address(0)) { |
| 31 | revert NotSetup(); |
| 32 | } |
| 33 | |
| 34 | return __asset; |
| 35 | } |
| 36 | |
| 37 | /// @notice Returns all assets being used |
| 38 | function _getAssets() internal view returns (address[] memory) { |
| 39 | return _assets.values(); |
| 40 | } |
| 41 | |
| 42 | /// @notice Creates a new asset and adds it to the list of assets |
| 43 | /// @param decimals The number of decimals for the asset |
| 44 | /// @return The address of the new asset |
| 45 | function _newAsset(uint8 decimals) internal returns (address) { |
| 46 | address asset_ = address(new MockERC20("Test Token", "TST", decimals)); // If names get confusing, concatenate the decimals to the name |
| 47 | _addAsset(asset_); |
| 48 | __asset = asset_; // sets the asset as the current asset |
| 49 | return asset_; |
| 50 | } |
| 51 | |
| 52 | /// @notice Adds an asset to the list of assets |
| 53 | /// @param target The address of the asset to add |
| 54 | function _addAsset(address target) internal { |
| 55 | if (_assets.contains(target)) { |
| 56 | revert Exists(); |
| 57 | } |
| 58 | |
| 59 | _assets.add(target); |
| 60 | } |
| 61 | |
| 62 | /// @notice Removes an asset from the list of assets |
| 63 | /// @param target The address of the asset to remove |
| 64 | function _removeAsset(address target) internal { |
| 65 | if (!_assets.contains(target)) { |
| 66 | revert NotAdded(); |
| 67 | } |
| 68 | |
| 69 | _assets.remove(target); |
| 70 | } |
| 71 | |
| 72 | /// @notice Switches the current asset based on the entropy |
| 73 | /// NOTE: We revert if the entropy is greater than the number of actors, for Halmos compatibility |
| 74 | /// @param entropy The entropy to choose a random asset in the array for switching |
| 75 | function _switchAsset(uint256 entropy) internal { |
| 76 | address target = _assets.at(entropy); |
| 77 | __asset = target; |
| 78 | } |
| 79 | |
| 80 | /// === Approve & Mint Asset === /// |
| 81 | |
| 82 | /// @notice Mint initial balance and approve allowances for the active asset |
| 83 | /// @param actorsArray The array of actors to mint the asset to |
| 84 | /// @param approvalArray The array of addresses to approve the asset to |
| 85 | /// @param amount The amount of the asset to mint |
| 86 | function _finalizeAssetDeployment(address[] memory actorsArray, address[] memory approvalArray, uint256 amount) |
| 87 | internal |
| 88 | { |
| 89 | _mintAssetToAllActors(actorsArray, amount); |
| 90 | for (uint256 i; i < approvalArray.length; i++) { |
| 91 | _approveAssetToAddressForAllActors(actorsArray, approvalArray[i]); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /// @notice Mint the asset to all actors |
| 96 | /// @param actorsArray The array of actors to mint the asset to |
| 97 | /// @param amount The amount of the asset to mint |
| 98 | function _mintAssetToAllActors(address[] memory actorsArray, uint256 amount) private { |
| 99 | // mint all actors |
| 100 | address[] memory assets = _getAssets(); |
| 101 | for (uint256 i; i < assets.length; i++) { |
| 102 | for (uint256 j; j < actorsArray.length; j++) { |
| 103 | vm.prank(actorsArray[j]); |
| 104 | MockERC20(assets[i]).mint(actorsArray[j], amount); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /// @notice Approve the asset to all actors |
| 110 | /// @param actorsArray The array of actors to approve the asset from |
| 111 | /// @param addressToApprove The address to approve the asset to |
| 112 | function _approveAssetToAddressForAllActors(address[] memory actorsArray, address addressToApprove) private { |
| 113 | // approve to all actors |
| 114 | address[] memory assets = _getAssets(); |
| 115 | for (uint256 i; i < assets.length; i++) { |
| 116 | for (uint256 j; j < actorsArray.length; j++) { |
| 117 | vm.prank(actorsArray[j]); |
| 118 | MockERC20(assets[i]).approve(addressToApprove, type(uint256).max); |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 |
88.0%
lib/setup-helpers/src/EnumerableSet.sol
Lines covered: 15 / 17 (88.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) |
| 3 | // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. |
| 4 | |
| 5 | pragma solidity ^0.8.0; |
| 6 | |
| 7 | /** |
| 8 | * @dev Library for managing |
| 9 | * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive |
| 10 | * types. |
| 11 | * |
| 12 | * Sets have the following properties: |
| 13 | * |
| 14 | * - Elements are added, removed, and checked for existence in constant time |
| 15 | * (O(1)). |
| 16 | * - Elements are enumerated in O(n). No guarantees are made on the ordering. |
| 17 | * |
| 18 | * ```solidity |
| 19 | * contract Example { |
| 20 | * // Add the library methods |
| 21 | * using EnumerableSet for EnumerableSet.AddressSet; |
| 22 | * |
| 23 | * // Declare a set state variable |
| 24 | * EnumerableSet.AddressSet private mySet; |
| 25 | * } |
| 26 | * ``` |
| 27 | * |
| 28 | * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) |
| 29 | * and `uint256` (`UintSet`) are supported. |
| 30 | * |
| 31 | * [WARNING] |
| 32 | * ==== |
| 33 | * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure |
| 34 | * unusable. |
| 35 | * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. |
| 36 | * |
| 37 | * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an |
| 38 | * array of EnumerableSet. |
| 39 | * ==== |
| 40 | */ |
| 41 | library EnumerableSet { |
| 42 | // To implement this library for multiple types with as little code |
| 43 | // repetition as possible, we write it in terms of a generic Set type with |
| 44 | // bytes32 values. |
| 45 | // The Set implementation uses private functions, and user-facing |
| 46 | // implementations (such as AddressSet) are just wrappers around the |
| 47 | // underlying Set. |
| 48 | // This means that we can only create new EnumerableSets for types that fit |
| 49 | // in bytes32. |
| 50 | |
| 51 | struct Set { |
| 52 | // Storage of set values |
| 53 | bytes32[] _values; |
| 54 | // Position of the value in the `values` array, plus 1 because index 0 |
| 55 | // means a value is not in the set. |
| 56 | mapping(bytes32 => uint256) _indexes; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * @dev Add a value to a set. O(1). |
| 61 | * |
| 62 | * Returns true if the value was added to the set, that is if it was not |
| 63 | * already present. |
| 64 | */ |
| 65 | function _add(Set storage set, bytes32 value) private returns (bool) { |
| 66 | if (!_contains(set, value)) { |
| 67 | set._values.push(value); |
| 68 | // The value is stored at length-1, but we add 1 to all indexes |
| 69 | // and use 0 as a sentinel value |
| 70 | set._indexes[value] = set._values.length; |
| 71 | return true; |
| 72 | } else { |
| 73 | return false; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * @dev Removes a value from a set. O(1). |
| 79 | * |
| 80 | * Returns true if the value was removed from the set, that is if it was |
| 81 | * present. |
| 82 | */ |
| 83 | function _remove(Set storage set, bytes32 value) private returns (bool) { |
| 84 | // We read and store the value's index to prevent multiple reads from the same storage slot |
| 85 | uint256 valueIndex = set._indexes[value]; |
| 86 | |
| 87 | if (valueIndex != 0) { |
| 88 | // Equivalent to contains(set, value) |
| 89 | // To delete an element from the _values array in O(1), we swap the element to delete with the last one in |
| 90 | // the array, and then remove the last element (sometimes called as 'swap and pop'). |
| 91 | // This modifies the order of the array, as noted in {at}. |
| 92 | |
| 93 | uint256 toDeleteIndex = valueIndex - 1; |
| 94 | uint256 lastIndex = set._values.length - 1; |
| 95 | |
| 96 | if (lastIndex != toDeleteIndex) { |
| 97 | bytes32 lastValue = set._values[lastIndex]; |
| 98 | |
| 99 | // Move the last value to the index where the value to delete is |
| 100 | set._values[toDeleteIndex] = lastValue; |
| 101 | // Update the index for the moved value |
| 102 | set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex |
| 103 | } |
| 104 | |
| 105 | // Delete the slot where the moved value was stored |
| 106 | set._values.pop(); |
| 107 | |
| 108 | // Delete the index for the deleted slot |
| 109 | delete set._indexes[value]; |
| 110 | |
| 111 | return true; |
| 112 | } else { |
| 113 | return false; |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * @dev Returns true if the value is in the set. O(1). |
| 119 | */ |
| 120 | function _contains(Set storage set, bytes32 value) private view returns (bool) { |
| 121 | return set._indexes[value] != 0; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * @dev Returns the number of values on the set. O(1). |
| 126 | */ |
| 127 | function _length(Set storage set) private view returns (uint256) { |
| 128 | return set._values.length; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * @dev Returns the value stored at position `index` in the set. O(1). |
| 133 | * |
| 134 | * Note that there are no guarantees on the ordering of values inside the |
| 135 | * array, and it may change when more values are added or removed. |
| 136 | * |
| 137 | * Requirements: |
| 138 | * |
| 139 | * - `index` must be strictly less than {length}. |
| 140 | */ |
| 141 | function _at(Set storage set, uint256 index) private view returns (bytes32) { |
| 142 | return set._values[index]; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * @dev Return the entire set in an array |
| 147 | * |
| 148 | * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed |
| 149 | * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that |
| 150 | * this function has an unbounded cost, and using it as part of a state-changing function may render the function |
| 151 | * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. |
| 152 | */ |
| 153 | function _values(Set storage set) private view returns (bytes32[] memory) { |
| 154 | return set._values; |
| 155 | } |
| 156 | |
| 157 | // Bytes32Set |
| 158 | |
| 159 | struct Bytes32Set { |
| 160 | Set _inner; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * @dev Add a value to a set. O(1). |
| 165 | * |
| 166 | * Returns true if the value was added to the set, that is if it was not |
| 167 | * already present. |
| 168 | */ |
| 169 | function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { |
| 170 | return _add(set._inner, value); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * @dev Removes a value from a set. O(1). |
| 175 | * |
| 176 | * Returns true if the value was removed from the set, that is if it was |
| 177 | * present. |
| 178 | */ |
| 179 | function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { |
| 180 | return _remove(set._inner, value); |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * @dev Returns true if the value is in the set. O(1). |
| 185 | */ |
| 186 | function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { |
| 187 | return _contains(set._inner, value); |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * @dev Returns the number of values in the set. O(1). |
| 192 | */ |
| 193 | function length(Bytes32Set storage set) internal view returns (uint256) { |
| 194 | return _length(set._inner); |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * @dev Returns the value stored at position `index` in the set. O(1). |
| 199 | * |
| 200 | * Note that there are no guarantees on the ordering of values inside the |
| 201 | * array, and it may change when more values are added or removed. |
| 202 | * |
| 203 | * Requirements: |
| 204 | * |
| 205 | * - `index` must be strictly less than {length}. |
| 206 | */ |
| 207 | function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { |
| 208 | return _at(set._inner, index); |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * @dev Return the entire set in an array |
| 213 | * |
| 214 | * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed |
| 215 | * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that |
| 216 | * this function has an unbounded cost, and using it as part of a state-changing function may render the function |
| 217 | * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. |
| 218 | */ |
| 219 | function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { |
| 220 | bytes32[] memory store = _values(set._inner); |
| 221 | bytes32[] memory result; |
| 222 | |
| 223 | /// @solidity memory-safe-assembly |
| 224 | assembly { |
| 225 | result := store |
| 226 | } |
| 227 | |
| 228 | return result; |
| 229 | } |
| 230 | |
| 231 | // AddressSet |
| 232 | |
| 233 | struct AddressSet { |
| 234 | Set _inner; |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * @dev Add a value to a set. O(1). |
| 239 | * |
| 240 | * Returns true if the value was added to the set, that is if it was not |
| 241 | * already present. |
| 242 | */ |
| 243 | function add(AddressSet storage set, address value) internal returns (bool) { |
| 244 | return _add(set._inner, bytes32(uint256(uint160(value)))); |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * @dev Removes a value from a set. O(1). |
| 249 | * |
| 250 | * Returns true if the value was removed from the set, that is if it was |
| 251 | * present. |
| 252 | */ |
| 253 | function remove(AddressSet storage set, address value) internal returns (bool) { |
| 254 | return _remove(set._inner, bytes32(uint256(uint160(value)))); |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * @dev Returns true if the value is in the set. O(1). |
| 259 | */ |
| 260 | function contains(AddressSet storage set, address value) internal view returns (bool) { |
| 261 | return _contains(set._inner, bytes32(uint256(uint160(value)))); |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * @dev Returns the number of values in the set. O(1). |
| 266 | */ |
| 267 | function length(AddressSet storage set) internal view returns (uint256) { |
| 268 | return _length(set._inner); |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * @dev Returns the value stored at position `index` in the set. O(1). |
| 273 | * |
| 274 | * Note that there are no guarantees on the ordering of values inside the |
| 275 | * array, and it may change when more values are added or removed. |
| 276 | * |
| 277 | * Requirements: |
| 278 | * |
| 279 | * - `index` must be strictly less than {length}. |
| 280 | */ |
| 281 | function at(AddressSet storage set, uint256 index) internal view returns (address) { |
| 282 | return address(uint160(uint256(_at(set._inner, index)))); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * @dev Return the entire set in an array |
| 287 | * |
| 288 | * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed |
| 289 | * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that |
| 290 | * this function has an unbounded cost, and using it as part of a state-changing function may render the function |
| 291 | * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. |
| 292 | */ |
| 293 | function values(AddressSet storage set) internal view returns (address[] memory) { |
| 294 | bytes32[] memory store = _values(set._inner); |
| 295 | address[] memory result; |
| 296 | |
| 297 | /// @solidity memory-safe-assembly |
| 298 | assembly { |
| 299 | result := store |
| 300 | } |
| 301 | |
| 302 | return result; |
| 303 | } |
| 304 | |
| 305 | // UintSet |
| 306 | |
| 307 | struct UintSet { |
| 308 | Set _inner; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * @dev Add a value to a set. O(1). |
| 313 | * |
| 314 | * Returns true if the value was added to the set, that is if it was not |
| 315 | * already present. |
| 316 | */ |
| 317 | function add(UintSet storage set, uint256 value) internal returns (bool) { |
| 318 | return _add(set._inner, bytes32(value)); |
| 319 | } |
| 320 | |
| 321 | /** |
| 322 | * @dev Removes a value from a set. O(1). |
| 323 | * |
| 324 | * Returns true if the value was removed from the set, that is if it was |
| 325 | * present. |
| 326 | */ |
| 327 | function remove(UintSet storage set, uint256 value) internal returns (bool) { |
| 328 | return _remove(set._inner, bytes32(value)); |
| 329 | } |
| 330 | |
| 331 | /** |
| 332 | * @dev Returns true if the value is in the set. O(1). |
| 333 | */ |
| 334 | function contains(UintSet storage set, uint256 value) internal view returns (bool) { |
| 335 | return _contains(set._inner, bytes32(value)); |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * @dev Returns the number of values in the set. O(1). |
| 340 | */ |
| 341 | function length(UintSet storage set) internal view returns (uint256) { |
| 342 | return _length(set._inner); |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * @dev Returns the value stored at position `index` in the set. O(1). |
| 347 | * |
| 348 | * Note that there are no guarantees on the ordering of values inside the |
| 349 | * array, and it may change when more values are added or removed. |
| 350 | * |
| 351 | * Requirements: |
| 352 | * |
| 353 | * - `index` must be strictly less than {length}. |
| 354 | */ |
| 355 | function at(UintSet storage set, uint256 index) internal view returns (uint256) { |
| 356 | return uint256(_at(set._inner, index)); |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * @dev Return the entire set in an array |
| 361 | * |
| 362 | * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed |
| 363 | * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that |
| 364 | * this function has an unbounded cost, and using it as part of a state-changing function may render the function |
| 365 | * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. |
| 366 | */ |
| 367 | function values(UintSet storage set) internal view returns (uint256[] memory) { |
| 368 | bytes32[] memory store = _values(set._inner); |
| 369 | uint256[] memory result; |
| 370 | |
| 371 | /// @solidity memory-safe-assembly |
| 372 | assembly { |
| 373 | result := store |
| 374 | } |
| 375 | |
| 376 | return result; |
| 377 | } |
| 378 | } |
| 379 |
33.0%
lib/setup-helpers/src/MockERC20.sol
Lines covered: 28 / 84 (33.0%)
| 1 | // SPDX-License-Identifier: AGPL-3.0-only |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. |
| 5 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) |
| 6 | /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) |
| 7 | /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. |
| 8 | abstract contract ERC20 { |
| 9 | /*////////////////////////////////////////////////////////////// |
| 10 | ERRORS |
| 11 | //////////////////////////////////////////////////////////////*/ |
| 12 | |
| 13 | /// @notice Thrown when attempting to transfer more tokens than available balance |
| 14 | error InsufficientBalance(address from, uint256 balance, uint256 amount); |
| 15 | |
| 16 | /// @notice Thrown when attempting to transfer more tokens than allowed |
| 17 | error InsufficientAllowance(address owner, address spender, uint256 allowance, uint256 amount); |
| 18 | |
| 19 | /// @notice Thrown when minting would cause overflow |
| 20 | error MintOverflow(uint256 currentSupply, uint256 amount); |
| 21 | |
| 22 | /*////////////////////////////////////////////////////////////// |
| 23 | EVENTS |
| 24 | //////////////////////////////////////////////////////////////*/ |
| 25 | |
| 26 | event Transfer(address indexed from, address indexed to, uint256 amount); |
| 27 | |
| 28 | event Approval(address indexed owner, address indexed spender, uint256 amount); |
| 29 | |
| 30 | /*////////////////////////////////////////////////////////////// |
| 31 | METADATA STORAGE |
| 32 | //////////////////////////////////////////////////////////////*/ |
| 33 | |
| 34 | string public name; |
| 35 | |
| 36 | string public symbol; |
| 37 | |
| 38 | uint8 public immutable decimals; |
| 39 | |
| 40 | /*////////////////////////////////////////////////////////////// |
| 41 | ERC20 STORAGE |
| 42 | //////////////////////////////////////////////////////////////*/ |
| 43 | |
| 44 | uint256 public totalSupply; |
| 45 | |
| 46 | mapping(address => uint256) public balanceOf; |
| 47 | |
| 48 | mapping(address => mapping(address => uint256)) public allowance; |
| 49 | |
| 50 | /*////////////////////////////////////////////////////////////// |
| 51 | EIP-2612 STORAGE |
| 52 | //////////////////////////////////////////////////////////////*/ |
| 53 | |
| 54 | uint256 internal immutable INITIAL_CHAIN_ID; |
| 55 | |
| 56 | bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; |
| 57 | |
| 58 | mapping(address => uint256) public nonces; |
| 59 | |
| 60 | /*////////////////////////////////////////////////////////////// |
| 61 | CONSTRUCTOR |
| 62 | //////////////////////////////////////////////////////////////*/ |
| 63 | |
| 64 | constructor(string memory _name, string memory _symbol, uint8 _decimals) { |
| 65 | name = _name; |
| 66 | symbol = _symbol; |
| 67 | decimals = _decimals; |
| 68 | |
| 69 | INITIAL_CHAIN_ID = block.chainid; |
| 70 | INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); |
| 71 | } |
| 72 | |
| 73 | /*////////////////////////////////////////////////////////////// |
| 74 | ERC20 LOGIC |
| 75 | //////////////////////////////////////////////////////////////*/ |
| 76 | |
| 77 | function approve(address spender, uint256 amount) public virtual returns (bool) { |
| 78 | allowance[msg.sender][spender] = amount; |
| 79 | |
| 80 | emit Approval(msg.sender, spender, amount); |
| 81 | |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | function transfer(address to, uint256 amount) public virtual returns (bool) { |
| 86 | uint256 fromBalance = balanceOf[msg.sender]; |
| 87 | if (fromBalance < amount) revert InsufficientBalance(msg.sender, fromBalance, amount); |
| 88 | |
| 89 | balanceOf[msg.sender] = fromBalance - amount; |
| 90 | |
| 91 | // Cannot overflow because the sum of all user |
| 92 | // balances can't exceed the max uint256 value. |
| 93 | unchecked { |
| 94 | balanceOf[to] += amount; |
| 95 | } |
| 96 | |
| 97 | emit Transfer(msg.sender, to, amount); |
| 98 | |
| 99 | return true; |
| 100 | } |
| 101 | |
| 102 | function transferFrom(address from, address to, uint256 amount) public virtual returns (bool) { |
| 103 | uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. |
| 104 | uint256 fromBalance = balanceOf[from]; |
| 105 | |
| 106 | if (allowed != type(uint256).max) { |
| 107 | if (allowed < amount) revert InsufficientAllowance(from, msg.sender, allowed, amount); |
| 108 | allowance[from][msg.sender] = allowed - amount; |
| 109 | } |
| 110 | |
| 111 | if (fromBalance < amount) revert InsufficientBalance(from, fromBalance, amount); |
| 112 | balanceOf[from] = fromBalance - amount; |
| 113 | |
| 114 | // Cannot overflow because the sum of all user |
| 115 | // balances can't exceed the max uint256 value. |
| 116 | unchecked { |
| 117 | balanceOf[to] += amount; |
| 118 | } |
| 119 | |
| 120 | emit Transfer(from, to, amount); |
| 121 | |
| 122 | return true; |
| 123 | } |
| 124 | |
| 125 | /*////////////////////////////////////////////////////////////// |
| 126 | EIP-2612 LOGIC |
| 127 | //////////////////////////////////////////////////////////////*/ |
| 128 | |
| 129 | function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) |
| 130 | public |
| 131 | virtual |
| 132 | { |
| 133 | require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); |
| 134 | |
| 135 | // Unchecked because the only math done is incrementing |
| 136 | // the owner's nonce which cannot realistically overflow. |
| 137 | unchecked { |
| 138 | address recoveredAddress = ecrecover( |
| 139 | keccak256( |
| 140 | abi.encodePacked( |
| 141 | "\x19\x01", |
| 142 | DOMAIN_SEPARATOR(), |
| 143 | keccak256( |
| 144 | abi.encode( |
| 145 | keccak256( |
| 146 | "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" |
| 147 | ), |
| 148 | owner, |
| 149 | spender, |
| 150 | value, |
| 151 | nonces[owner]++, |
| 152 | deadline |
| 153 | ) |
| 154 | ) |
| 155 | ) |
| 156 | ), |
| 157 | v, |
| 158 | r, |
| 159 | s |
| 160 | ); |
| 161 | |
| 162 | require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); |
| 163 | |
| 164 | allowance[recoveredAddress][spender] = value; |
| 165 | } |
| 166 | |
| 167 | emit Approval(owner, spender, value); |
| 168 | } |
| 169 | |
| 170 | function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { |
| 171 | return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); |
| 172 | } |
| 173 | |
| 174 | function computeDomainSeparator() internal view virtual returns (bytes32) { |
| 175 | return keccak256( |
| 176 | abi.encode( |
| 177 | keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), |
| 178 | keccak256(bytes(name)), |
| 179 | keccak256("1"), |
| 180 | block.chainid, |
| 181 | address(this) |
| 182 | ) |
| 183 | ); |
| 184 | } |
| 185 | |
| 186 | /*////////////////////////////////////////////////////////////// |
| 187 | INTERNAL MINT/BURN LOGIC |
| 188 | //////////////////////////////////////////////////////////////*/ |
| 189 | |
| 190 | function _mint(address to, uint256 amount) internal virtual { |
| 191 | uint256 newTotalSupply = totalSupply + amount; |
| 192 | if (newTotalSupply < totalSupply) revert MintOverflow(totalSupply, amount); |
| 193 | totalSupply = newTotalSupply; |
| 194 | |
| 195 | // Cannot overflow because the sum of all user |
| 196 | // balances can't exceed the max uint256 value. |
| 197 | unchecked { |
| 198 | balanceOf[to] += amount; |
| 199 | } |
| 200 | |
| 201 | emit Transfer(address(0), to, amount); |
| 202 | } |
| 203 | |
| 204 | function _burn(address from, uint256 amount) internal virtual { |
| 205 | uint256 fromBalance = balanceOf[from]; |
| 206 | if (fromBalance < amount) revert InsufficientBalance(from, fromBalance, amount); |
| 207 | |
| 208 | balanceOf[from] = fromBalance - amount; |
| 209 | |
| 210 | // Cannot underflow because a user's balance |
| 211 | // will never be larger than the total supply. |
| 212 | unchecked { |
| 213 | totalSupply -= amount; |
| 214 | } |
| 215 | |
| 216 | emit Transfer(from, address(0), amount); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | contract MockERC20 is ERC20 { |
| 221 | constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol, _decimals) {} |
| 222 | |
| 223 | function mint(address to, uint256 value) public virtual { |
| 224 | _mint(to, value); |
| 225 | } |
| 226 | |
| 227 | function burn(address from, uint256 value) public virtual { |
| 228 | _burn(from, value); |
| 229 | } |
| 230 | } |
| 231 |
0.0%
lib/setup-helpers/src/Panic.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | library Panic { |
| 5 | // compiler panics |
| 6 | string constant assertionPanic = "Panic(1)"; |
| 7 | string constant arithmeticPanic = "Panic(17)"; |
| 8 | string constant divisionPanic = "Panic(18)"; |
| 9 | string constant enumPanic = "Panic(33)"; |
| 10 | string constant arrayPanic = "Panic(34)"; |
| 11 | string constant emptyArrayPanic = "Panic(49)"; |
| 12 | string constant outOfBoundsPanic = "Panic(50)"; |
| 13 | string constant memoryPanic = "Panic(65)"; |
| 14 | string constant functionPanic = "Panic(81)"; |
| 15 | } |
| 16 |
0.0%
lib/setup-helpers/src/Utils.sol
Lines covered: 0 / 1 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {Panic} from "./Panic.sol"; |
| 5 | |
| 6 | contract Utils { |
| 7 | /// @dev check if the error returned from a call is the same as the expected error |
| 8 | /// @param err the error returned from a call |
| 9 | /// @param expected the expected error |
| 10 | /// @return true if the error is the same as the expected error, false otherwise |
| 11 | function checkError(bytes memory err, string memory expected) internal pure returns (bool) { |
| 12 | (string memory revertMsg, bool customError) = _getRevertMsg(err); |
| 13 | |
| 14 | bytes32 errorBytes; |
| 15 | bytes32 expectedBytes; |
| 16 | |
| 17 | if (customError) { |
| 18 | // Custom error returns the keccak256 hash of the error, so don't need to hash it again |
| 19 | errorBytes = bytes32(abi.encodePacked(revertMsg, bytes28(0))); |
| 20 | expectedBytes = bytes4(keccak256(abi.encodePacked(expected))); |
| 21 | } else { |
| 22 | errorBytes = keccak256(abi.encodePacked(revertMsg)); |
| 23 | expectedBytes = keccak256(abi.encodePacked(expected)); |
| 24 | } |
| 25 | |
| 26 | // Check if error contains expected string |
| 27 | return errorBytes == expectedBytes; |
| 28 | } |
| 29 | |
| 30 | /// @dev get the revert message from a call |
| 31 | /// @notice based on https://ethereum.stackexchange.com/a/83577 |
| 32 | /// @param returnData the return data from a call |
| 33 | /// @return the revert message and a boolean indicating if it's a custom error |
| 34 | function _getRevertMsg(bytes memory returnData) internal pure returns (string memory, bool) { |
| 35 | // If the returnData length is 0, then the transaction failed silently (without a revert message) |
| 36 | if (returnData.length == 0) return ("", false); |
| 37 | |
| 38 | // 1. Panic(uint256) |
| 39 | // Check that the data has the right size: 4 bytes for signature + 32 bytes for panic code |
| 40 | if (returnData.length == 4 + 32) { |
| 41 | // Check that the data starts with the Panic signature |
| 42 | bool panic = _checkIfPanic(returnData); |
| 43 | |
| 44 | if (panic) { |
| 45 | return _getPanicCode(returnData); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | // Get the error selector from returnData |
| 50 | bytes4 errorSelector = _getErrorSelector(returnData); |
| 51 | |
| 52 | // 2. Error(string) - If it's a standard revert string |
| 53 | bytes4 errorStringSelector = bytes4(keccak256("Error(string)")); // Get the standard Error(string) selector |
| 54 | |
| 55 | if (errorSelector == errorStringSelector) { |
| 56 | assembly { |
| 57 | // slice the sighash of the error so we can decode the string |
| 58 | returnData := add(returnData, 0x04) |
| 59 | } |
| 60 | return (abi.decode(returnData, (string)), false); |
| 61 | } |
| 62 | |
| 63 | // 3. Custom error - Return the custom error selector as a string |
| 64 | return (string(abi.encodePacked(errorSelector)), true); |
| 65 | } |
| 66 | |
| 67 | function _checkIfPanic(bytes memory returnData) internal pure returns (bool) { |
| 68 | bytes4 panicSignature = bytes4(keccak256(bytes("Panic(uint256)"))); |
| 69 | |
| 70 | for (uint256 i = 0; i < 4; i++) { |
| 71 | if (returnData[i] != panicSignature[i]) { |
| 72 | return false; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | function _getPanicCode(bytes memory returnData) internal pure returns (string memory, bool) { |
| 80 | uint256 panicCode; |
| 81 | for (uint256 i = 4; i < 36; i++) { |
| 82 | panicCode = panicCode << 8; |
| 83 | panicCode |= uint8(returnData[i]); |
| 84 | } |
| 85 | |
| 86 | // Convert the panic code into its string representation |
| 87 | if (panicCode == 1) { |
| 88 | // call assert with an argument that evaluates to false |
| 89 | return (Panic.assertionPanic, false); |
| 90 | } else if (panicCode == 17) { |
| 91 | // arithmetic operation results in underflow or overflow |
| 92 | return (Panic.arithmeticPanic, false); |
| 93 | } else if (panicCode == 18) { |
| 94 | // division or modulo by zero |
| 95 | return (Panic.divisionPanic, false); |
| 96 | } else if (panicCode == 33) { |
| 97 | // converting a value that's too big or negative into an enum type |
| 98 | return (Panic.enumPanic, false); |
| 99 | } else if (panicCode == 34) { |
| 100 | // access a storage byte array that is incorrectly encoded |
| 101 | return (Panic.arrayPanic, false); |
| 102 | } else if (panicCode == 49) { |
| 103 | // call .pop() on an empty array |
| 104 | return (Panic.emptyArrayPanic, false); |
| 105 | } else if (panicCode == 50) { |
| 106 | // array access out of bounds |
| 107 | return (Panic.outOfBoundsPanic, false); |
| 108 | } else if (panicCode == 65) { |
| 109 | // allocate too much memory or create an array that is too large |
| 110 | return (Panic.memoryPanic, false); |
| 111 | } else if (panicCode == 81) { |
| 112 | // call a zero-initialized variable of internal function type |
| 113 | return (Panic.functionPanic, false); |
| 114 | } |
| 115 | |
| 116 | return ("Undefined panic code", false); |
| 117 | } |
| 118 | |
| 119 | function _getErrorSelector(bytes memory returnData) internal pure returns (bytes4 errorSelector) { |
| 120 | assembly { |
| 121 | errorSelector := mload(add(returnData, 0x20)) |
| 122 | } |
| 123 | return errorSelector; |
| 124 | } |
| 125 | } |
| 126 |
88.0%
lib/solmate/src/tokens/ERC20.sol
Lines covered: 62 / 70 (88.0%)
| 1 | // SPDX-License-Identifier: AGPL-3.0-only |
| 2 | pragma solidity >=0.8.0; |
| 3 | |
| 4 | /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. |
| 5 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) |
| 6 | /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) |
| 7 | /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. |
| 8 | abstract contract ERC20 { |
| 9 | /*////////////////////////////////////////////////////////////// |
| 10 | EVENTS |
| 11 | //////////////////////////////////////////////////////////////*/ |
| 12 | |
| 13 | event Transfer(address indexed from, address indexed to, uint256 amount); |
| 14 | |
| 15 | event Approval(address indexed owner, address indexed spender, uint256 amount); |
| 16 | |
| 17 | /*////////////////////////////////////////////////////////////// |
| 18 | METADATA STORAGE |
| 19 | //////////////////////////////////////////////////////////////*/ |
| 20 | |
| 21 | string public name; |
| 22 | |
| 23 | string public symbol; |
| 24 | |
| 25 | uint8 public immutable decimals; |
| 26 | |
| 27 | /*////////////////////////////////////////////////////////////// |
| 28 | ERC20 STORAGE |
| 29 | //////////////////////////////////////////////////////////////*/ |
| 30 | |
| 31 | uint256 public totalSupply; |
| 32 | |
| 33 | mapping(address => uint256) public balanceOf; |
| 34 | |
| 35 | mapping(address => mapping(address => uint256)) public allowance; |
| 36 | |
| 37 | /*////////////////////////////////////////////////////////////// |
| 38 | EIP-2612 STORAGE |
| 39 | //////////////////////////////////////////////////////////////*/ |
| 40 | |
| 41 | uint256 internal immutable INITIAL_CHAIN_ID; |
| 42 | |
| 43 | bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; |
| 44 | |
| 45 | mapping(address => uint256) public nonces; |
| 46 | |
| 47 | /*////////////////////////////////////////////////////////////// |
| 48 | CONSTRUCTOR |
| 49 | //////////////////////////////////////////////////////////////*/ |
| 50 | |
| 51 | constructor( |
| 52 | string memory _name, |
| 53 | string memory _symbol, |
| 54 | uint8 _decimals |
| 55 | ) { |
| 56 | name = _name; |
| 57 | symbol = _symbol; |
| 58 | decimals = _decimals; |
| 59 | |
| 60 | INITIAL_CHAIN_ID = block.chainid; |
| 61 | INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); |
| 62 | } |
| 63 | |
| 64 | /*////////////////////////////////////////////////////////////// |
| 65 | ERC20 LOGIC |
| 66 | //////////////////////////////////////////////////////////////*/ |
| 67 | |
| 68 | function approve(address spender, uint256 amount) public virtual returns (bool) { |
| 69 | allowance[msg.sender][spender] = amount; |
| 70 | |
| 71 | emit Approval(msg.sender, spender, amount); |
| 72 | |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | function transfer(address to, uint256 amount) public virtual returns (bool) { |
| 77 | balanceOf[msg.sender] -= amount; |
| 78 | |
| 79 | // Cannot overflow because the sum of all user |
| 80 | // balances can't exceed the max uint256 value. |
| 81 | unchecked { |
| 82 | balanceOf[to] += amount; |
| 83 | } |
| 84 | |
| 85 | emit Transfer(msg.sender, to, amount); |
| 86 | |
| 87 | return true; |
| 88 | } |
| 89 | |
| 90 | function transferFrom( |
| 91 | address from, |
| 92 | address to, |
| 93 | uint256 amount |
| 94 | ) public virtual returns (bool) { |
| 95 | uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. |
| 96 | |
| 97 | if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; |
| 98 | |
| 99 | balanceOf[from] -= amount; |
| 100 | |
| 101 | // Cannot overflow because the sum of all user |
| 102 | // balances can't exceed the max uint256 value. |
| 103 | unchecked { |
| 104 | balanceOf[to] += amount; |
| 105 | } |
| 106 | |
| 107 | emit Transfer(from, to, amount); |
| 108 | |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | /*////////////////////////////////////////////////////////////// |
| 113 | EIP-2612 LOGIC |
| 114 | //////////////////////////////////////////////////////////////*/ |
| 115 | |
| 116 | function permit( |
| 117 | address owner, |
| 118 | address spender, |
| 119 | uint256 value, |
| 120 | uint256 deadline, |
| 121 | uint8 v, |
| 122 | bytes32 r, |
| 123 | bytes32 s |
| 124 | ) public virtual { |
| 125 | require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); |
| 126 | |
| 127 | // Unchecked because the only math done is incrementing |
| 128 | // the owner's nonce which cannot realistically overflow. |
| 129 | unchecked { |
| 130 | address recoveredAddress = ecrecover( |
| 131 | keccak256( |
| 132 | abi.encodePacked( |
| 133 | "\x19\x01", |
| 134 | DOMAIN_SEPARATOR(), |
| 135 | keccak256( |
| 136 | abi.encode( |
| 137 | keccak256( |
| 138 | "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" |
| 139 | ), |
| 140 | owner, |
| 141 | spender, |
| 142 | value, |
| 143 | nonces[owner]++, |
| 144 | deadline |
| 145 | ) |
| 146 | ) |
| 147 | ) |
| 148 | ), |
| 149 | v, |
| 150 | r, |
| 151 | s |
| 152 | ); |
| 153 | |
| 154 | require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); |
| 155 | |
| 156 | allowance[recoveredAddress][spender] = value; |
| 157 | } |
| 158 | |
| 159 | emit Approval(owner, spender, value); |
| 160 | } |
| 161 | |
| 162 | function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { |
| 163 | return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); |
| 164 | } |
| 165 | |
| 166 | function computeDomainSeparator() internal view virtual returns (bytes32) { |
| 167 | return |
| 168 | keccak256( |
| 169 | abi.encode( |
| 170 | keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), |
| 171 | keccak256(bytes(name)), |
| 172 | keccak256("1"), |
| 173 | block.chainid, |
| 174 | address(this) |
| 175 | ) |
| 176 | ); |
| 177 | } |
| 178 | |
| 179 | /*////////////////////////////////////////////////////////////// |
| 180 | INTERNAL MINT/BURN LOGIC |
| 181 | //////////////////////////////////////////////////////////////*/ |
| 182 | |
| 183 | function _mint(address to, uint256 amount) internal virtual { |
| 184 | totalSupply += amount; |
| 185 | |
| 186 | // Cannot overflow because the sum of all user |
| 187 | // balances can't exceed the max uint256 value. |
| 188 | unchecked { |
| 189 | balanceOf[to] += amount; |
| 190 | } |
| 191 | |
| 192 | emit Transfer(address(0), to, amount); |
| 193 | } |
| 194 | |
| 195 | function _burn(address from, uint256 amount) internal virtual { |
| 196 | balanceOf[from] -= amount; |
| 197 | |
| 198 | // Cannot underflow because a user's balance |
| 199 | // will never be larger than the total supply. |
| 200 | unchecked { |
| 201 | totalSupply -= amount; |
| 202 | } |
| 203 | |
| 204 | emit Transfer(from, address(0), amount); |
| 205 | } |
| 206 | } |
| 207 |
76.0%
lib/solmate/src/tokens/ERC4626.sol
Lines covered: 46 / 60 (76.0%)
| 1 | // SPDX-License-Identifier: AGPL-3.0-only |
| 2 | pragma solidity >=0.8.0; |
| 3 | |
| 4 | import {ERC20} from "../tokens/ERC20.sol"; |
| 5 | import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; |
| 6 | import {FixedPointMathLib} from "../utils/FixedPointMathLib.sol"; |
| 7 | |
| 8 | /// @notice Minimal ERC4626 tokenized Vault implementation. |
| 9 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol) |
| 10 | abstract contract ERC4626 is ERC20 { |
| 11 | using SafeTransferLib for ERC20; |
| 12 | using FixedPointMathLib for uint256; |
| 13 | |
| 14 | /*////////////////////////////////////////////////////////////// |
| 15 | EVENTS |
| 16 | //////////////////////////////////////////////////////////////*/ |
| 17 | |
| 18 | event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); |
| 19 | |
| 20 | event Withdraw( |
| 21 | address indexed caller, |
| 22 | address indexed receiver, |
| 23 | address indexed owner, |
| 24 | uint256 assets, |
| 25 | uint256 shares |
| 26 | ); |
| 27 | |
| 28 | /*////////////////////////////////////////////////////////////// |
| 29 | IMMUTABLES |
| 30 | //////////////////////////////////////////////////////////////*/ |
| 31 | |
| 32 | ERC20 public immutable asset; |
| 33 | |
| 34 | constructor( |
| 35 | ERC20 _asset, |
| 36 | string memory _name, |
| 37 | string memory _symbol |
| 38 | ) ERC20(_name, _symbol, _asset.decimals()) { |
| 39 | asset = _asset; |
| 40 | } |
| 41 | |
| 42 | /*////////////////////////////////////////////////////////////// |
| 43 | DEPOSIT/WITHDRAWAL LOGIC |
| 44 | //////////////////////////////////////////////////////////////*/ |
| 45 | |
| 46 | function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) { |
| 47 | // Check for rounding error since we round down in previewDeposit. |
| 48 | require((shares = previewDeposit(assets)) != 0, "ZERO_SHARES"); |
| 49 | |
| 50 | // Need to transfer before minting or ERC777s could reenter. |
| 51 | asset.safeTransferFrom(msg.sender, address(this), assets); |
| 52 | |
| 53 | _mint(receiver, shares); |
| 54 | |
| 55 | emit Deposit(msg.sender, receiver, assets, shares); |
| 56 | |
| 57 | afterDeposit(assets, shares); |
| 58 | } |
| 59 | |
| 60 | function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) { |
| 61 | assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up. |
| 62 | |
| 63 | // Need to transfer before minting or ERC777s could reenter. |
| 64 | asset.safeTransferFrom(msg.sender, address(this), assets); |
| 65 | |
| 66 | _mint(receiver, shares); |
| 67 | |
| 68 | emit Deposit(msg.sender, receiver, assets, shares); |
| 69 | |
| 70 | afterDeposit(assets, shares); |
| 71 | } |
| 72 | |
| 73 | function withdraw( |
| 74 | uint256 assets, |
| 75 | address receiver, |
| 76 | address owner |
| 77 | ) public virtual returns (uint256 shares) { |
| 78 | shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up. |
| 79 | |
| 80 | if (msg.sender != owner) { |
| 81 | uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. |
| 82 | |
| 83 | if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; |
| 84 | } |
| 85 | |
| 86 | beforeWithdraw(assets, shares); |
| 87 | |
| 88 | _burn(owner, shares); |
| 89 | |
| 90 | emit Withdraw(msg.sender, receiver, owner, assets, shares); |
| 91 | |
| 92 | asset.safeTransfer(receiver, assets); |
| 93 | } |
| 94 | |
| 95 | function redeem( |
| 96 | uint256 shares, |
| 97 | address receiver, |
| 98 | address owner |
| 99 | ) public virtual returns (uint256 assets) { |
| 100 | if (msg.sender != owner) { |
| 101 | uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. |
| 102 | |
| 103 | if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares; |
| 104 | } |
| 105 | |
| 106 | // Check for rounding error since we round down in previewRedeem. |
| 107 | require((assets = previewRedeem(shares)) != 0, "ZERO_ASSETS"); |
| 108 | |
| 109 | beforeWithdraw(assets, shares); |
| 110 | |
| 111 | _burn(owner, shares); |
| 112 | |
| 113 | emit Withdraw(msg.sender, receiver, owner, assets, shares); |
| 114 | |
| 115 | asset.safeTransfer(receiver, assets); |
| 116 | } |
| 117 | |
| 118 | /*////////////////////////////////////////////////////////////// |
| 119 | ACCOUNTING LOGIC |
| 120 | //////////////////////////////////////////////////////////////*/ |
| 121 | |
| 122 | function totalAssets() public view virtual returns (uint256); |
| 123 | |
| 124 | function convertToShares(uint256 assets) public view virtual returns (uint256) { |
| 125 | uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. |
| 126 | |
| 127 | return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets()); |
| 128 | } |
| 129 | |
| 130 | function convertToAssets(uint256 shares) public view virtual returns (uint256) { |
| 131 | uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. |
| 132 | |
| 133 | return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply); |
| 134 | } |
| 135 | |
| 136 | function previewDeposit(uint256 assets) public view virtual returns (uint256) { |
| 137 | return convertToShares(assets); |
| 138 | } |
| 139 | |
| 140 | function previewMint(uint256 shares) public view virtual returns (uint256) { |
| 141 | uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. |
| 142 | |
| 143 | return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply); |
| 144 | } |
| 145 | |
| 146 | function previewWithdraw(uint256 assets) public view virtual returns (uint256) { |
| 147 | uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. |
| 148 | |
| 149 | return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets()); |
| 150 | } |
| 151 | |
| 152 | function previewRedeem(uint256 shares) public view virtual returns (uint256) { |
| 153 | return convertToAssets(shares); |
| 154 | } |
| 155 | |
| 156 | /*////////////////////////////////////////////////////////////// |
| 157 | DEPOSIT/WITHDRAWAL LIMIT LOGIC |
| 158 | //////////////////////////////////////////////////////////////*/ |
| 159 | |
| 160 | function maxDeposit(address) public view virtual returns (uint256) { |
| 161 | return type(uint256).max; |
| 162 | } |
| 163 | |
| 164 | function maxMint(address) public view virtual returns (uint256) { |
| 165 | return type(uint256).max; |
| 166 | } |
| 167 | |
| 168 | function maxWithdraw(address owner) public view virtual returns (uint256) { |
| 169 | return convertToAssets(balanceOf[owner]); |
| 170 | } |
| 171 | |
| 172 | function maxRedeem(address owner) public view virtual returns (uint256) { |
| 173 | return balanceOf[owner]; |
| 174 | } |
| 175 | |
| 176 | /*////////////////////////////////////////////////////////////// |
| 177 | INTERNAL HOOKS LOGIC |
| 178 | //////////////////////////////////////////////////////////////*/ |
| 179 | |
| 180 | function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {} |
| 181 | |
| 182 | function afterDeposit(uint256 assets, uint256 shares) internal virtual {} |
| 183 | } |
| 184 |
0.0%
lib/solmate/src/utils/FixedPointMathLib.sol
Lines covered: 0 / 11 (0.0%)
| 1 | // SPDX-License-Identifier: AGPL-3.0-only |
| 2 | pragma solidity >=0.8.0; |
| 3 | |
| 4 | /// @notice Arithmetic library with operations for fixed-point numbers. |
| 5 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol) |
| 6 | /// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) |
| 7 | library FixedPointMathLib { |
| 8 | /*////////////////////////////////////////////////////////////// |
| 9 | SIMPLIFIED FIXED POINT OPERATIONS |
| 10 | //////////////////////////////////////////////////////////////*/ |
| 11 | |
| 12 | uint256 internal constant MAX_UINT256 = 2**256 - 1; |
| 13 | |
| 14 | uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. |
| 15 | |
| 16 | function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { |
| 17 | return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. |
| 18 | } |
| 19 | |
| 20 | function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { |
| 21 | return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. |
| 22 | } |
| 23 | |
| 24 | function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { |
| 25 | return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. |
| 26 | } |
| 27 | |
| 28 | function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { |
| 29 | return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. |
| 30 | } |
| 31 | |
| 32 | /*////////////////////////////////////////////////////////////// |
| 33 | LOW LEVEL FIXED POINT OPERATIONS |
| 34 | //////////////////////////////////////////////////////////////*/ |
| 35 | |
| 36 | function mulDivDown( |
| 37 | uint256 x, |
| 38 | uint256 y, |
| 39 | uint256 denominator |
| 40 | ) internal pure returns (uint256 z) { |
| 41 | /// @solidity memory-safe-assembly |
| 42 | assembly { |
| 43 | // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) |
| 44 | if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { |
| 45 | revert(0, 0) |
| 46 | } |
| 47 | |
| 48 | // Divide x * y by the denominator. |
| 49 | z := div(mul(x, y), denominator) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | function mulDivUp( |
| 54 | uint256 x, |
| 55 | uint256 y, |
| 56 | uint256 denominator |
| 57 | ) internal pure returns (uint256 z) { |
| 58 | /// @solidity memory-safe-assembly |
| 59 | assembly { |
| 60 | // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) |
| 61 | if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { |
| 62 | revert(0, 0) |
| 63 | } |
| 64 | |
| 65 | // If x * y modulo the denominator is strictly greater than 0, |
| 66 | // 1 is added to round up the division of x * y by the denominator. |
| 67 | z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator)) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | function rpow( |
| 72 | uint256 x, |
| 73 | uint256 n, |
| 74 | uint256 scalar |
| 75 | ) internal pure returns (uint256 z) { |
| 76 | /// @solidity memory-safe-assembly |
| 77 | assembly { |
| 78 | switch x |
| 79 | case 0 { |
| 80 | switch n |
| 81 | case 0 { |
| 82 | // 0 ** 0 = 1 |
| 83 | z := scalar |
| 84 | } |
| 85 | default { |
| 86 | // 0 ** n = 0 |
| 87 | z := 0 |
| 88 | } |
| 89 | } |
| 90 | default { |
| 91 | switch mod(n, 2) |
| 92 | case 0 { |
| 93 | // If n is even, store scalar in z for now. |
| 94 | z := scalar |
| 95 | } |
| 96 | default { |
| 97 | // If n is odd, store x in z for now. |
| 98 | z := x |
| 99 | } |
| 100 | |
| 101 | // Shifting right by 1 is like dividing by 2. |
| 102 | let half := shr(1, scalar) |
| 103 | |
| 104 | for { |
| 105 | // Shift n right by 1 before looping to halve it. |
| 106 | n := shr(1, n) |
| 107 | } n { |
| 108 | // Shift n right by 1 each iteration to halve it. |
| 109 | n := shr(1, n) |
| 110 | } { |
| 111 | // Revert immediately if x ** 2 would overflow. |
| 112 | // Equivalent to iszero(eq(div(xx, x), x)) here. |
| 113 | if shr(128, x) { |
| 114 | revert(0, 0) |
| 115 | } |
| 116 | |
| 117 | // Store x squared. |
| 118 | let xx := mul(x, x) |
| 119 | |
| 120 | // Round to the nearest number. |
| 121 | let xxRound := add(xx, half) |
| 122 | |
| 123 | // Revert if xx + half overflowed. |
| 124 | if lt(xxRound, xx) { |
| 125 | revert(0, 0) |
| 126 | } |
| 127 | |
| 128 | // Set x to scaled xxRound. |
| 129 | x := div(xxRound, scalar) |
| 130 | |
| 131 | // If n is even: |
| 132 | if mod(n, 2) { |
| 133 | // Compute z * x. |
| 134 | let zx := mul(z, x) |
| 135 | |
| 136 | // If z * x overflowed: |
| 137 | if iszero(eq(div(zx, x), z)) { |
| 138 | // Revert if x is non-zero. |
| 139 | if iszero(iszero(x)) { |
| 140 | revert(0, 0) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | // Round to the nearest number. |
| 145 | let zxRound := add(zx, half) |
| 146 | |
| 147 | // Revert if zx + half overflowed. |
| 148 | if lt(zxRound, zx) { |
| 149 | revert(0, 0) |
| 150 | } |
| 151 | |
| 152 | // Return properly scaled zxRound. |
| 153 | z := div(zxRound, scalar) |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | /*////////////////////////////////////////////////////////////// |
| 161 | GENERAL NUMBER UTILITIES |
| 162 | //////////////////////////////////////////////////////////////*/ |
| 163 | |
| 164 | function sqrt(uint256 x) internal pure returns (uint256 z) { |
| 165 | /// @solidity memory-safe-assembly |
| 166 | assembly { |
| 167 | let y := x // We start y at x, which will help us make our initial estimate. |
| 168 | |
| 169 | z := 181 // The "correct" value is 1, but this saves a multiplication later. |
| 170 | |
| 171 | // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad |
| 172 | // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically. |
| 173 | |
| 174 | // We check y >= 2^(k + 8) but shift right by k bits |
| 175 | // each branch to ensure that if x >= 256, then y >= 256. |
| 176 | if iszero(lt(y, 0x10000000000000000000000000000000000)) { |
| 177 | y := shr(128, y) |
| 178 | z := shl(64, z) |
| 179 | } |
| 180 | if iszero(lt(y, 0x1000000000000000000)) { |
| 181 | y := shr(64, y) |
| 182 | z := shl(32, z) |
| 183 | } |
| 184 | if iszero(lt(y, 0x10000000000)) { |
| 185 | y := shr(32, y) |
| 186 | z := shl(16, z) |
| 187 | } |
| 188 | if iszero(lt(y, 0x1000000)) { |
| 189 | y := shr(16, y) |
| 190 | z := shl(8, z) |
| 191 | } |
| 192 | |
| 193 | // Goal was to get z*z*y within a small factor of x. More iterations could |
| 194 | // get y in a tighter range. Currently, we will have y in [256, 256*2^16). |
| 195 | // We ensured y >= 256 so that the relative difference between y and y+1 is small. |
| 196 | // That's not possible if x < 256 but we can just verify those cases exhaustively. |
| 197 | |
| 198 | // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256. |
| 199 | // Correctness can be checked exhaustively for x < 256, so we assume y >= 256. |
| 200 | // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps. |
| 201 | |
| 202 | // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range |
| 203 | // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256. |
| 204 | |
| 205 | // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate |
| 206 | // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18. |
| 207 | |
| 208 | // There is no overflow risk here since y < 2^136 after the first branch above. |
| 209 | z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181. |
| 210 | |
| 211 | // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough. |
| 212 | z := shr(1, add(z, div(x, z))) |
| 213 | z := shr(1, add(z, div(x, z))) |
| 214 | z := shr(1, add(z, div(x, z))) |
| 215 | z := shr(1, add(z, div(x, z))) |
| 216 | z := shr(1, add(z, div(x, z))) |
| 217 | z := shr(1, add(z, div(x, z))) |
| 218 | z := shr(1, add(z, div(x, z))) |
| 219 | |
| 220 | // If x+1 is a perfect square, the Babylonian method cycles between |
| 221 | // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor. |
| 222 | // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division |
| 223 | // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case. |
| 224 | // If you don't care whether the floor or ceil square root is returned, you can remove this statement. |
| 225 | z := sub(z, lt(div(x, z), z)) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) { |
| 230 | /// @solidity memory-safe-assembly |
| 231 | assembly { |
| 232 | // Mod x by y. Note this will return |
| 233 | // 0 instead of reverting if y is zero. |
| 234 | z := mod(x, y) |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) { |
| 239 | /// @solidity memory-safe-assembly |
| 240 | assembly { |
| 241 | // Divide x by y. Note this will return |
| 242 | // 0 instead of reverting if y is zero. |
| 243 | r := div(x, y) |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) { |
| 248 | /// @solidity memory-safe-assembly |
| 249 | assembly { |
| 250 | // Add 1 to x * y if x % y > 0. Note this will |
| 251 | // return 0 instead of reverting if y is zero. |
| 252 | z := add(gt(mod(x, y), 0), div(x, y)) |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 |
88.0%
lib/solmate/src/utils/SafeTransferLib.sol
Lines covered: 23 / 26 (88.0%)
| 1 | // SPDX-License-Identifier: AGPL-3.0-only |
| 2 | pragma solidity >=0.8.0; |
| 3 | |
| 4 | import {ERC20} from "../tokens/ERC20.sol"; |
| 5 | |
| 6 | /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. |
| 7 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) |
| 8 | /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. |
| 9 | library SafeTransferLib { |
| 10 | /*////////////////////////////////////////////////////////////// |
| 11 | ETH OPERATIONS |
| 12 | //////////////////////////////////////////////////////////////*/ |
| 13 | |
| 14 | function safeTransferETH(address to, uint256 amount) internal { |
| 15 | bool success; |
| 16 | |
| 17 | /// @solidity memory-safe-assembly |
| 18 | assembly { |
| 19 | // Transfer the ETH and store if it succeeded or not. |
| 20 | success := call(gas(), to, amount, 0, 0, 0, 0) |
| 21 | } |
| 22 | |
| 23 | require(success, "ETH_TRANSFER_FAILED"); |
| 24 | } |
| 25 | |
| 26 | /*////////////////////////////////////////////////////////////// |
| 27 | ERC20 OPERATIONS |
| 28 | //////////////////////////////////////////////////////////////*/ |
| 29 | |
| 30 | function safeTransferFrom( |
| 31 | ERC20 token, |
| 32 | address from, |
| 33 | address to, |
| 34 | uint256 amount |
| 35 | ) internal { |
| 36 | bool success; |
| 37 | |
| 38 | /// @solidity memory-safe-assembly |
| 39 | assembly { |
| 40 | // Get a pointer to some free memory. |
| 41 | let freeMemoryPointer := mload(0x40) |
| 42 | |
| 43 | // Write the abi-encoded calldata into memory, beginning with the function selector. |
| 44 | mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) |
| 45 | mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. |
| 46 | mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. |
| 47 | mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. |
| 48 | |
| 49 | // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. |
| 50 | // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. |
| 51 | success := call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) |
| 52 | |
| 53 | // Set success to whether the call reverted, if not we check it either |
| 54 | // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. |
| 55 | if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { |
| 56 | success := iszero(or(iszero(extcodesize(token)), returndatasize())) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | require(success, "TRANSFER_FROM_FAILED"); |
| 61 | } |
| 62 | |
| 63 | function safeTransfer( |
| 64 | ERC20 token, |
| 65 | address to, |
| 66 | uint256 amount |
| 67 | ) internal { |
| 68 | bool success; |
| 69 | |
| 70 | /// @solidity memory-safe-assembly |
| 71 | assembly { |
| 72 | // Get a pointer to some free memory. |
| 73 | let freeMemoryPointer := mload(0x40) |
| 74 | |
| 75 | // Write the abi-encoded calldata into memory, beginning with the function selector. |
| 76 | mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) |
| 77 | mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. |
| 78 | mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. |
| 79 | |
| 80 | // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. |
| 81 | // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. |
| 82 | success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) |
| 83 | |
| 84 | // Set success to whether the call reverted, if not we check it either |
| 85 | // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. |
| 86 | if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { |
| 87 | success := iszero(or(iszero(extcodesize(token)), returndatasize())) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | require(success, "TRANSFER_FAILED"); |
| 92 | } |
| 93 | |
| 94 | function safeApprove( |
| 95 | ERC20 token, |
| 96 | address to, |
| 97 | uint256 amount |
| 98 | ) internal { |
| 99 | bool success; |
| 100 | |
| 101 | /// @solidity memory-safe-assembly |
| 102 | assembly { |
| 103 | // Get a pointer to some free memory. |
| 104 | let freeMemoryPointer := mload(0x40) |
| 105 | |
| 106 | // Write the abi-encoded calldata into memory, beginning with the function selector. |
| 107 | mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) |
| 108 | mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. |
| 109 | mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. |
| 110 | |
| 111 | // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. |
| 112 | // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. |
| 113 | success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) |
| 114 | |
| 115 | // Set success to whether the call reverted, if not we check it either |
| 116 | // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. |
| 117 | if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { |
| 118 | success := iszero(or(iszero(extcodesize(token)), returndatasize())) |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | require(success, "APPROVE_FAILED"); |
| 123 | } |
| 124 | } |
| 125 |
100.0%
src/vault.sol
Lines covered: 18 / 18 (100.0%)
| 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.30; |
| 3 | |
| 4 | import {ERC20} from "solmate/tokens/ERC20.sol"; |
| 5 | import {ERC4626} from "solmate/tokens/ERC4626.sol"; |
| 6 | |
| 7 | |
| 8 | contract ERC20Mock is ERC20 { |
| 9 | constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol, _decimals) {} |
| 10 | |
| 11 | function mint(address to, uint256 amount) public { |
| 12 | _mint(to, amount); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | contract ERC4626Mock is ERC4626 { |
| 17 | constructor(ERC20 _asset, string memory _name, string memory _symbol) ERC4626(_asset, _name, _symbol) {} |
| 18 | |
| 19 | uint256 _totalAssets; |
| 20 | |
| 21 | function totalAssets() public view override returns (uint256) { |
| 22 | return _totalAssets; |
| 23 | } |
| 24 | |
| 25 | function beforeWithdraw(uint256 assets, uint256) internal override { |
| 26 | _totalAssets = _totalAssets - assets; |
| 27 | } |
| 28 | |
| 29 | function afterDeposit(uint256 assets, uint256) internal override { |
| 30 | _totalAssets = _totalAssets + assets; |
| 31 | } |
| 32 | |
| 33 | function recognizeProfit(uint256 profit) public { |
| 34 | ERC20Mock(address(asset)).mint(address(this), profit); |
| 35 | _totalAssets += profit; |
| 36 | } |
| 37 | |
| 38 | function recognizeLoss(uint256 loss) public { |
| 39 | ERC20Mock(address(asset)).mint(address(0), loss); |
| 40 | |
| 41 | _totalAssets -= loss; |
| 42 | } |
| 43 | } |
100.0%
test/recon/BeforeAfter.sol
Lines covered: 4 / 4 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {Setup} from "./Setup.sol"; |
| 5 | |
| 6 | // ghost variables for tracking state variable values before and after function calls |
| 7 | abstract contract BeforeAfter is Setup { |
| 8 | struct Vars { |
| 9 | uint256 __ignore__; |
| 10 | } |
| 11 | |
| 12 | Vars internal _before; |
| 13 | Vars internal _after; |
| 14 | |
| 15 | modifier updateGhosts { |
| 16 | __before(); |
| 17 | _; |
| 18 | __after(); |
| 19 | } |
| 20 | |
| 21 | function __before() internal { |
| 22 | |
| 23 | } |
| 24 | |
| 25 | function __after() internal { |
| 26 | |
| 27 | } |
| 28 | } |
100.0%
test/recon/CryticTester.sol
Lines covered: 2 / 2 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {CryticAsserts} from "@chimera/CryticAsserts.sol"; |
| 5 | |
| 6 | import {TargetFunctions} from "./TargetFunctions.sol"; |
| 7 | |
| 8 | // echidna . --contract CryticTester --config echidna.yaml --format text --workers 16 --test-limit 1000000 |
| 9 | // medusa fuzz |
| 10 | contract CryticTester is TargetFunctions, CryticAsserts { |
| 11 | constructor() payable { |
| 12 | setup(); |
| 13 | } |
| 14 | } |
0.0%
test/recon/CryticToFoundry.sol
Lines covered: 0 / 5 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {FoundryAsserts} from "@chimera/FoundryAsserts.sol"; |
| 5 | |
| 6 | import "forge-std/console2.sol"; |
| 7 | |
| 8 | import {Test} from "forge-std/Test.sol"; |
| 9 | import {TargetFunctions} from "./TargetFunctions.sol"; |
| 10 | |
| 11 | |
| 12 | // forge test --match-contract CryticToFoundry -vv |
| 13 | contract CryticToFoundry is Test, TargetFunctions, FoundryAsserts { |
| 14 | function setUp() public { |
| 15 | setup(); |
| 16 | |
| 17 | targetContract(address(this)); |
| 18 | } |
| 19 | |
| 20 | // forge test --match-test test_crytic -vvv |
| 21 | function test_crytic() public { |
| 22 | // TODO: add failing property tests here for debugging |
| 23 | } |
| 24 | |
| 25 | } |
81.0%
test/recon/Properties.sol
Lines covered: 13 / 16 (81.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {Asserts} from "@chimera/Asserts.sol"; |
| 5 | import {BeforeAfter} from "./BeforeAfter.sol"; |
| 6 | import "src/vault.sol"; // Import the vault contracts |
| 7 | |
| 8 | abstract contract Properties is BeforeAfter, Asserts { |
| 9 | |
| 10 | // Helper functions from the properties library |
| 11 | function clampLte(uint256 value, uint256 max) internal pure returns (uint256) { |
| 12 | return value > max ? max : value; |
| 13 | } |
| 14 | |
| 15 | // Mock the supportsInternalTestingIface - set to true to enable rounding tests |
| 16 | bool constant supportsInternalTestingIface = true; |
| 17 | |
| 18 | // Mock vault and asset references |
| 19 | function vault() internal view returns (ERC4626Mock) { |
| 20 | return vaultImpl; |
| 21 | } |
| 22 | |
| 23 | function asset() internal view returns (ERC20Mock) { |
| 24 | return token; |
| 25 | } |
| 26 | |
| 27 | // Mock assertion functions to match library interface |
| 28 | function assertWithMsg(bool condition, string memory message) internal { |
| 29 | t(condition, message); |
| 30 | } |
| 31 | |
| 32 | |
| 33 | |
| 34 | // Mock logging |
| 35 | event LogUint256(string, uint256); |
| 36 | function verify_convertToAssetsMustNotRevert(uint256 shares) public { |
| 37 | // arbitrarily define "reasonable values" to be 10**(token.decimals+20) |
| 38 | uint256 reasonably_largest_value = 10 ** (20 + 20); |
| 39 | |
| 40 | // prevent scenarios where there is enough totalSupply to trigger overflows |
| 41 | require(vault().totalSupply() <= reasonably_largest_value); |
| 42 | shares = clampLte(shares, reasonably_largest_value); |
| 43 | |
| 44 | // exclude the possibility of idiosyncratic reverts. Might have to add more in future. |
| 45 | shares = clampLte(shares, vault().totalSupply()); |
| 46 | |
| 47 | emit LogUint256("totalSupply", vault().totalSupply()); |
| 48 | emit LogUint256("totalAssets", vault().totalAssets()); |
| 49 | |
| 50 | try vault().convertToAssets(shares) { |
| 51 | return; |
| 52 | } catch { |
| 53 | assertWithMsg(false, "vault.convertToAssets() must not revert"); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 |
100.0%
test/recon/Setup.sol
Lines covered: 5 / 5 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | // Chimera deps |
| 5 | import {BaseSetup} from "@chimera/BaseSetup.sol"; |
| 6 | import {vm} from "@chimera/Hevm.sol"; |
| 7 | |
| 8 | // Managers |
| 9 | import {ActorManager} from "@recon/ActorManager.sol"; |
| 10 | import {AssetManager} from "@recon/AssetManager.sol"; |
| 11 | |
| 12 | // Helpers |
| 13 | import {Utils} from "@recon/Utils.sol"; |
| 14 | |
| 15 | // Your deps |
| 16 | import "src/vault.sol"; |
| 17 | |
| 18 | abstract contract Setup is BaseSetup, ActorManager, AssetManager, Utils { |
| 19 | ERC4626Mock vaultImpl; |
| 20 | ERC20Mock token; |
| 21 | /// === Setup === /// |
| 22 | function setup() internal virtual override { |
| 23 | token = new ERC20Mock("Token", "TKN", 18); |
| 24 | vaultImpl = new ERC4626Mock(token, "Vault Token", "vTKN"); |
| 25 | } |
| 26 | |
| 27 | /// === MODIFIERS === /// |
| 28 | /// Prank admin and actor |
| 29 | |
| 30 | modifier asAdmin { |
| 31 | vm.prank(address(this)); |
| 32 | _; |
| 33 | } |
| 34 | |
| 35 | modifier asActor { |
| 36 | vm.prank(address(_getActor())); |
| 37 | _; |
| 38 | } |
| 39 | } |
| 40 |
0.0%
test/recon/TargetFunctions.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | // Chimera deps |
| 5 | import {vm} from "@chimera/Hevm.sol"; |
| 6 | |
| 7 | // Helpers |
| 8 | import {Panic} from "@recon/Panic.sol"; |
| 9 | |
| 10 | // Targets |
| 11 | // NOTE: Always import and apply them in alphabetical order, so much easier to debug! |
| 12 | import { AdminTargets } from "./targets/AdminTargets.sol"; |
| 13 | import { DoomsdayTargets } from "./targets/DoomsdayTargets.sol"; |
| 14 | import { ERC4626MockTargets } from "./targets/ERC4626MockTargets.sol"; |
| 15 | import { ManagersTargets } from "./targets/ManagersTargets.sol"; |
| 16 | |
| 17 | abstract contract TargetFunctions is |
| 18 | AdminTargets, |
| 19 | DoomsdayTargets, |
| 20 | ERC4626MockTargets, |
| 21 | ManagersTargets |
| 22 | { |
| 23 | /// CUSTOM TARGET FUNCTIONS - Add your own target functions here /// |
| 24 | |
| 25 | |
| 26 | /// AUTO GENERATED TARGET FUNCTIONS - WARNING: DO NOT DELETE OR MODIFY THIS LINE /// |
| 27 | } |
| 28 |
0.0%
test/recon/targets/AdminTargets.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseTargetFunctions} from "@chimera/BaseTargetFunctions.sol"; |
| 5 | import {BeforeAfter} from "../BeforeAfter.sol"; |
| 6 | import {Properties} from "../Properties.sol"; |
| 7 | // Chimera deps |
| 8 | import {vm} from "@chimera/Hevm.sol"; |
| 9 | |
| 10 | // Helpers |
| 11 | import {Panic} from "@recon/Panic.sol"; |
| 12 | |
| 13 | abstract contract AdminTargets is |
| 14 | BaseTargetFunctions, |
| 15 | Properties |
| 16 | { |
| 17 | /// CUSTOM TARGET FUNCTIONS - Add your own target functions here /// |
| 18 | |
| 19 | |
| 20 | /// AUTO GENERATED TARGET FUNCTIONS - WARNING: DO NOT DELETE OR MODIFY THIS LINE /// |
| 21 | } |
0.0%
test/recon/targets/DoomsdayTargets.sol
Lines covered: 0 / 0 (0.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseTargetFunctions} from "@chimera/BaseTargetFunctions.sol"; |
| 5 | import {BeforeAfter} from "../BeforeAfter.sol"; |
| 6 | import {Properties} from "../Properties.sol"; |
| 7 | // Chimera deps |
| 8 | import {vm} from "@chimera/Hevm.sol"; |
| 9 | |
| 10 | // Helpers |
| 11 | import {Panic} from "@recon/Panic.sol"; |
| 12 | |
| 13 | abstract contract DoomsdayTargets is |
| 14 | BaseTargetFunctions, |
| 15 | Properties |
| 16 | { |
| 17 | /// Makes a handler have no side effects |
| 18 | /// The fuzzer will call this anyway, and because it reverts it will be removed from shrinking |
| 19 | /// Replace the "withGhosts" with "stateless" to make the code clean |
| 20 | modifier stateless() { |
| 21 | _; |
| 22 | revert("stateless"); |
| 23 | } |
| 24 | } |
100.0%
test/recon/targets/ERC4626MockTargets.sol
Lines covered: 20 / 20 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseTargetFunctions} from "@chimera/BaseTargetFunctions.sol"; |
| 5 | import {BeforeAfter} from "../BeforeAfter.sol"; |
| 6 | import {Properties} from "../Properties.sol"; |
| 7 | // Chimera deps |
| 8 | import {vm} from "@chimera/Hevm.sol"; |
| 9 | |
| 10 | // Helpers |
| 11 | import {Panic} from "@recon/Panic.sol"; |
| 12 | |
| 13 | import "src/vault.sol"; |
| 14 | |
| 15 | abstract contract ERC4626MockTargets is |
| 16 | BaseTargetFunctions, |
| 17 | Properties |
| 18 | { |
| 19 | /// CUSTOM TARGET FUNCTIONS - Add your own target functions here /// |
| 20 | |
| 21 | |
| 22 | /// AUTO GENERATED TARGET FUNCTIONS - WARNING: DO NOT DELETE OR MODIFY THIS LINE /// |
| 23 | |
| 24 | function vaultImpl_approve(address spender, uint256 amount) public asActor { |
| 25 | vaultImpl.approve(spender, amount); |
| 26 | } |
| 27 | |
| 28 | function vaultImpl_deposit(uint256 assets, address receiver) public asActor { |
| 29 | vaultImpl.deposit(assets, receiver); |
| 30 | } |
| 31 | |
| 32 | function vaultImpl_mint(uint256 shares, address receiver) public asActor { |
| 33 | vaultImpl.mint(shares, receiver); |
| 34 | } |
| 35 | |
| 36 | function vaultImpl_permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public asActor { |
| 37 | vaultImpl.permit(owner, spender, value, deadline, v, r, s); |
| 38 | } |
| 39 | |
| 40 | function vaultImpl_recognizeLoss(uint256 loss) public asActor { |
| 41 | vaultImpl.recognizeLoss(loss); |
| 42 | } |
| 43 | |
| 44 | function vaultImpl_recognizeProfit(uint256 profit) public asActor { |
| 45 | vaultImpl.recognizeProfit(profit); |
| 46 | } |
| 47 | |
| 48 | function vaultImpl_redeem(uint256 shares, address receiver, address owner) public asActor { |
| 49 | vaultImpl.redeem(shares, receiver, owner); |
| 50 | } |
| 51 | |
| 52 | function vaultImpl_transfer(address to, uint256 amount) public asActor { |
| 53 | vaultImpl.transfer(to, amount); |
| 54 | } |
| 55 | |
| 56 | function vaultImpl_transferFrom(address from, address to, uint256 amount) public asActor { |
| 57 | vaultImpl.transferFrom(from, to, amount); |
| 58 | } |
| 59 | |
| 60 | function vaultImpl_withdraw(uint256 assets, address receiver, address owner) public asActor { |
| 61 | vaultImpl.withdraw(assets, receiver, owner); |
| 62 | } |
| 63 | } |
100.0%
test/recon/targets/ManagersTargets.sol
Lines covered: 11 / 11 (100.0%)
| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | pragma solidity ^0.8.0; |
| 3 | |
| 4 | import {BaseTargetFunctions} from "@chimera/BaseTargetFunctions.sol"; |
| 5 | import {BeforeAfter} from "../BeforeAfter.sol"; |
| 6 | import {Properties} from "../Properties.sol"; |
| 7 | import {vm} from "@chimera/Hevm.sol"; |
| 8 | |
| 9 | import {MockERC20} from "@recon/MockERC20.sol"; |
| 10 | |
| 11 | |
| 12 | // Target functions that are effectively inherited from the Actor and AssetManagers |
| 13 | // Once properly standardized, managers will expose these by default |
| 14 | // Keeping them out makes your project more custom |
| 15 | abstract contract ManagersTargets is |
| 16 | BaseTargetFunctions, |
| 17 | Properties |
| 18 | { |
| 19 | // == ACTOR HANDLERS == // |
| 20 | |
| 21 | /// @dev Start acting as another actor |
| 22 | function switchActor(uint256 entropy) public { |
| 23 | _switchActor(entropy); |
| 24 | } |
| 25 | |
| 26 | |
| 27 | /// @dev Starts using a new asset |
| 28 | function switch_asset(uint256 entropy) public { |
| 29 | _switchAsset(entropy); |
| 30 | } |
| 31 | |
| 32 | /// @dev Deploy a new token and add it to the list of assets, then set it as the current asset |
| 33 | function add_new_asset(uint8 decimals) public returns (address) { |
| 34 | address newAsset = _newAsset(decimals); |
| 35 | return newAsset; |
| 36 | } |
| 37 | |
| 38 | /// === GHOST UPDATING HANDLERS ===/// |
| 39 | /// We `updateGhosts` cause you never know (e.g. donations) |
| 40 | /// If you don't want to track donations, remove the `updateGhosts` |
| 41 | |
| 42 | /// @dev Approve to arbitrary address, uses Actor by default |
| 43 | /// NOTE: You're almost always better off setting approvals in `Setup` |
| 44 | function asset_approve(address to, uint128 amt) public updateGhosts asActor { |
| 45 | MockERC20(_getAsset()).approve(to, amt); |
| 46 | } |
| 47 | |
| 48 | /// @dev Mint to arbitrary address, uses owner by default, even though MockERC20 doesn't check |
| 49 | function asset_mint(address to, uint128 amt) public updateGhosts asAdmin { |
| 50 | MockERC20(_getAsset()).mint(to, amt); |
| 51 | } |
| 52 | } |